arvgta/ajaxify

Smart scroll

Closed this issue · 0 comments

EDIT: Implemented

Demos


Feel free to comment!

Functionality: Remember the vertical position of the scrollbar when navigating between pages
A bit like in this post / article

Switch in interface:

scrolltop: "s"  //new default parameter - "smart", true - always scroll to top of page, false - no scroll

Algorithm:

  1. Remember the following value of the previous page, in a new $.offsets sub-plugin:
$(window).scrollTop()
  1. Restore the scrollbar offset of current page after rendering