So I\'m developing a jQuery mobile phonegap app and I noticed that every time I open the panel the main page scrolls to the top automatically. I want the page to remain at t
I've recently encountered this and come up with the following solution.
1.- When user clicks Menu link, run a function called menuOpen
function menuOpen(){
var scrollTop = window.document.body.scrollTop;
//You can replace this with a regular menu open. I use some code that places the same menu panel on every page so that I only have to write it once, but it causes a duplicate ID of "menupanel"- hence the code that will only open #menupanel on the current active page
$.mobile.activePage.find('#menupanel').panel("open");
window.document.body.scrollTop = scrollTop;
}