diff options
Diffstat (limited to 'public/static/collapse.js')
-rw-r--r-- | public/static/collapse.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public/static/collapse.js b/public/static/collapse.js index 0015c89..373870c 100644 --- a/public/static/collapse.js +++ b/public/static/collapse.js @@ -14,7 +14,12 @@ $(document).ready(function() { if ($(this).hasClass('expanded-moreinfo')) { $(this).removeClass('expanded-moreinfo'); $(this).addClass('collapsed-moreinfo'); + // Setting an empty hash causes the browser to scroll back + // to the top -- we don't want that. + var posX = window.pageXOffset; + var posY = window.pageYOffset; document.location.hash = ''; + window.scrollTo(posX, posY); } else { $('.moreinfo').each(function() { |