Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery Mobile - scroll to specific div on pageload
- $.mobile.silentScroll($("#myElementId").offset().top);
- $('[data-role=page]').bind("pageshow", function() {
- $.mobile.silentScroll($("#myElementId").offset().top);
- });
- $('[data-role=page]').bind("pageshow", function() {
- setTimeout(function(){$.mobile.silentScroll($("#myElementId").offset().top);},100);
- });
- <script src="[jQuery Core]"></script>
- <script>
- $(document).bind("mobileinit", function(){
- minScrollBack = 90000;
- });
- </script>
- <script src="[jQuery Mobile]"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement