Rectangle 27 0

The position of the scrollbar is saved to localstorage, then when the page loads again, either by refresh or back from another page, if localstorage has a value greater than 0 which represents the top of the scrollbar (default, unscrolled position), it scrolls to that position.

var element = $(".scroll-pane").jScrollPane({showArrows:true});
if(element != undefined) {
  var api ="jsp");
  $(function() {
    if(parseInt(localStorage.getItem("ScrollPosition")) > 0) {
    $(".scroll-pane").bind("jsp-scroll-y", function(event, scrollPositionY, isAtTop, isAtBottom) {
      localStorage.setItem("ScrollPosition", scrollPositionY)

javascript - jScrollPane how to store scroll position? - Stack Overflo...

javascript jquery jscrollpane