🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

rememberScroll.js is a lightweight yet useful jQuery plugin that uses cookies to maintain the horizontal and vertical scroll positions on page refresh and/or re-visit.

scrolling

Documentation

rememberscrolljs

jquery.rememberscroll.js a jQuery plugin that remembers where user scrolls in a web page. When the user comes back to the page later, it automatically jumps to the most recent scroll position.

Author: Steve

function

  • $.scrollTrack([seconds],[expiredays])
  • the function can be called from a jQuery $(document).ready block

parameters:

  • seconds: the frequency, i.e. in every this number of seconds the page scroll position will be queried
  • expiredays: number of days cookies will be effective to store position data
  • both parameters are optional, "seconds" defaults to 2, and "expiredays" defaults to 365

Usage examples:

  • $.scrollTrack()
  • $.scrollTrack(1)
  • $.scrollTrack(1, 365*5)

You May Also Like