Reputation: 13
Is there a way of altering the default state of a JQuery Mobile panel to be open when the page loads?
Currently using jQuery Mobile 1.4.1 and can't find anything in the documentation and searched every where I can think online.
Upvotes: 1
Views: 1939
Reputation: 4636
You can try the following:
$(document).on('pagebeforeshow', '#index', function(){
$( "#mypanel" ).panel( "open");
});
With "index" and "mypanel" being respectively the ids of your page and your panel.
Upvotes: 1