I am trying to use jQuery to automatically scroll up a page when a page loads. Here is my code:
<script type="text/javascript"> $(document).ready(function () { $(window).scrollTop(0); return false; }); </script>
However, the code does not work. I also tried replacing $(window) with $('html, body') , unfortunately this still doesn't work.
So can anyone advise this? Thank you very much!
source share