I want to scroll page to second section on a button click. I am using following jquery
$('.home_scroll_btn a').on('click', function(){
var scrollPosition = $('#intro-home').offset().top;
$('html, body').animate({
scrollTop:scrollPosition
});
});
The problem is when i click the button the page first scroll to top and then scroll to particular section.
Thanks in advance!
javascript:void(0)as href. Check this FIDDLE