If my dynamically loaded content was higher than the menu, the panel scroll didn't fit. The scroll behavior is dependent on the page scroll (nicely described in jQuery Mobile's issue tracker: "Make panel and page content scroll independently"). But I have found a solution based on the panel events and css overflow & height properties, testet only on Android > 4 so far.
var panel = $("#ID_OF_THE_PANEL");
panel.on("panelbeforeopen", function(event, ui) {
// alternatively .ui-page can be
// used to select the page
var page = $('#ID_OF_THE_PAGE');
page.height($(window).height());
page.css({
overflow : 'hidden'
});
});
panel.on("panelbeforeclose", function(event, ui) {
var page = $('#ID_OF_THE_PAGE');
page.height(winHeight);
page.css({
overflow : 'visible'
});
});
i need help my friend :/
ReplyDeletewere i have to put this script for my panel scroll down independent from page content?
Thank u very much
Just put it after mobileinit was triggered, beein sure that the panel is rendered & available.
ReplyDeletethis help me a lot, thanks very much
ReplyDelete