javascript - Autoscrolling after page refresh doesn't work -


i'm trying automatic scrolling left side of horizontal website after refresh (like pressing f5). trying scrollleft() , got nothing. window.scrollto(0,0) working button this:

 function scrollwindow()  {  window.scrollto(0,0);   } 

and

<input type="button" onclick="scrollwindow()" value="scroll" /> 

this works, doesn't $(document).ready(function());:

<script>    $(document).ready(scrollwindow()); </script> 

i found in question top answer:

 $(document).ready(function(){     $(this).scrolltop(0); }); 

but didn't work me. can me problem?

try this:

$(document).ready(function(){     scrollwindow(); }); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -