Move to top of page when hash changes.
authorJason Skomorowski <jason@indexdata.com>
Thu, 7 Apr 2011 04:27:45 +0000 (04:27 +0000)
committerJason Skomorowski <jason@indexdata.com>
Thu, 7 Apr 2011 04:27:45 +0000 (04:27 +0000)
mkdru.client.js

index 11c4f69..0561a7e 100644 (file)
@@ -198,6 +198,8 @@ mkdru.hashChange = function () {
     mkdru.hashFromState();
     return;
   }
+  // return to top of page
+  window.scrollTo(0,0);
   // do we need to restart the search?
   var searchTrigger = false;
   // shallow copy of state so we can see what changed.