I wrote a script so that when you click on the link anchor, the scroll smoothly transfers to the item. This is where the scrolling problem goes smoothly and there is no problem, but when you click again on the same link, the scrolling option stupidly disappears, that is, by turning the mouse wheel or dragging the scroll, everything stupidly stands still and does not move, but after several attempts it passes. In the console, it is purely therefore I don’t even have thoughts because of this problem.
//Anchor Scroll $(document).ready(function() { $('a[href^="#"]').click(function(event) { event.preventDefault(); elementClick = $(this).attr("href"); destination = $(elementClick).offset().top; var scrolling = destination - 100; $('html,body').animate( { scrollTop: scrolling }, 500 ); }); });