Fix the little jump when you go to #home etc.

This commit is contained in:
Ray Schamp 2015-05-07 18:06:28 -04:00
parent 0d73f38bbb
commit bf52f90457
4 changed files with 10 additions and 7 deletions

View file

@ -288,7 +288,6 @@ $("[data-action='static-link']").click(function(e) {
* <a href="#privacy-policy" data-action="static-link">Privacy Policy</a>
*
*/
e.preventDefault();
var path = $(this).attr("href").substring(1);
showPage(path);
});
@ -329,11 +328,6 @@ function showPage(path) {
if (path == "editor") {
$toShow.css({top: 0});
}
window.location.hash = toShow;
if ($("body > main > article").has(toShow).length == 0) {
document.body.scrollTop = 0;
}
}
var initialID = "home";