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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -