소스 검색

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();
   });