Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top