Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page loading scrolled to bottom

Has anyone had the issue where some versions IE7 and 9beta will load a page scrolled to the bottom? This only happens when clicking from the main nav, not directly inputting the url. Here's an example

How would I add a scrollTop function to each main nav link via jQuery? Would that be an acceptable workaround?

like image 268
Dirty Bird Design Avatar asked Dec 14 '10 21:12

Dirty Bird Design


1 Answers

As a workaround, you could add this to each page:

$(document).ready(function() {
  $(document).scrollTop(0);
});

You wouldn't be able to add this to the links, as the script needs to run after the page load. This also feels hacky without knowing what is causing the problem, but with IE, I would rather hack sometimes than know...

like image 189
Jeff B Avatar answered Sep 25 '22 01:09

Jeff B