Jquery mobile scroll to top of page on page load
Hi everyone
I have done extensive research on creating a solution for my problem, all forum posts just dont answer my question.
Im using an iPhone 5 to test my web app. Everytime i load a new page dynamically from my CMS i find that if i scroll to the bottom BEFORE the page fully loads then i get scrolled to the top of the page when the page has completed loading. This is highly unwanted as i could only imagine that when my listviews are long this would be highly annoying to any user thats half way down the list.
Please could somebody assist me? I have tried the following codes
- <script language="javascript">
- $(document).ready(function() {
- $(".dropdown dt a").click(function(event) {
- event.preventDefault();
- $(".dropdown dd ul").toggle('slow');
- });
- $(".dropdown dd ul li a").click(function(event) {
- event.preventDefault();
- $(".dropdown dd ul").hide();
- });
- });
- </script>
I also tried this code
- <script>
- $(function() {
- $.mobile.silentScroll (0);
- });
- </script>
Any help would be greatly appreciated.
Kind regards