jquery - How to scroll window to at bottom of page after ajax call -


i have jquery ajax code execute fine on success give response , display on page. after displaying response on page want window scroll @ bottom position.

my jquery code

$("body").scrolltop( $(document).height() - $(window).height() ); 

but not scroll @ bottom of page. how can achieve? help.

you not need jquery this. scrollto() method scrolls document specified coordinates.:

window.scrollto(0,document.body.scrollheight); 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -