Jquery mobile - saving scroll position
So I just have a quick question. I have a listbox that pops up a view that fills the screen. Once the view is dismissed, the window scrolls up back to the top. Does anyone know how to disable this behavior, or save the mouse position so I can silentScroll()
back to it after th开发者_开发百科e popover disappears? Thanks
I have this bit in the head to disable the native browser menus for dropdowns and the like:
<script type="text/javascript">
$(document).bind('mobileinit',function(){
$.mobile.selectmenu.prototype.options.nativeMenu = false;
});
</script>
Alright, I solved the problem by doing this in the "pagehide" method:
$("body").css("overflow", "hidden");
and then this in the "pageshow" method:
$("body").css("overflow", "auto");
Hope that helps someone.
精彩评论