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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -