jquery Method for scrolling the scroll bar to the position of the element after clicking the element
- 2021-07-09 06:49:06
- OfStack
After clicking the element, the scroll bar scrolls to the element position:
$('a.lead-link').bind('click', function(e) {
e.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top - 60
}, 1500);
});