浏览代码

js anchor

ouidade 2 年之前
父节点
当前提交
db1db0bdaf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      web/themes/custom/eql/scripts/main.js

+ 2 - 2
web/themes/custom/eql/scripts/main.js

@@ -144,11 +144,11 @@ jQuery(function($) {
       var $anchor = $('.block-entity-fieldnodefield-textes'),
               fixedElementHeight = 350;
       if ($anchor.length > 0) {
-          $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight}, 250);
+          $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
       }
   };
 
-  $(window).on('hashchange load', function() {
+  $(window).on('hashchange', function() {
       adjustAnchor();
   });