From db1db0bdafa11bf4770985c781cce38abc9d3feb Mon Sep 17 00:00:00 2001 From: ouidade Date: Thu, 7 Apr 2022 13:04:17 +0200 Subject: [PATCH] js anchor --- web/themes/custom/eql/scripts/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/themes/custom/eql/scripts/main.js b/web/themes/custom/eql/scripts/main.js index 60d2e3f..499c0ba 100644 --- a/web/themes/custom/eql/scripts/main.js +++ b/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(); });