if scroll position jquery code example Example: jquery keep scroll position var scroll = $(window).scrollTop(); // yada $("html").scrollTop(scroll);