The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Jquery Smooth scroll with extra animation help please please
okay here is the code please take a close look at it
$('a[href^="#"]').click(function() { $('html,body').animate({scrollTop:$(this.hash).offset().top}, 200); return false; });
how can i alter this code so that i can add a easing effect like swing to it please help me
Put easing after duration:
$('a[href^="#"]').click(function() { $('html,body').animate({ scrollTop: $(this.hash).offset().top }, 200, "swing"); return false; });