Smooth JavaScript/jQuery scroll to element -


i'm trying make horizontal scroll website, don't know how smoothly scroll 1 element other. tried following code:

$("a[href='#top']").click(function() {   $("body").animate({ scrolltop: 0 }, "slow");   return false; }); 

but scrolls top, tried jquery-plugin scrollto, can't work, tried jquery plugin:

$('.click').click(function(){     $.scrollto( '.last', 800, {easing:'elasout'}); }); 

but without succes.

does know good, easy understand, sample can use? in advance!

untested

   $('.click').click(function(){         $.scrollto( $('.last'), 800);     }); 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -