Cómo cambiar de página en jQuery mobile (1.4 beta)?
Estoy leyendo los documentos que $.mobile.changePage
han sido obsoletos.
Pero no dice a favor de qué, o qué puedo usar en su lugar.
¿Hay una nueva página de documentación de la API para esto?
Solía usar $.mobile.changePage("index.html", {reloadPage:true});
pero parece que agregando reloadPage:true
la página se rompe
23
2 answers
A partir de jQuery Mobile 1.4, $.mobile.changePage()
queda obsoleto y se sustituye por:
$(":mobile-pagecontainer").pagecontainer("change", "target", { options });
Abreviado ...
$.mobile.pageContainer.pagecontainer("change", "target", { options });
Aún más corto ...(1)
$("body").pagecontainer("change", "target", { options });
Nota: target es #page_id o URL.
(1)<body>
es pageContainer por defecto, a menos que $.mobile.pageContainer
se modifique en mobileinit
.
76
Author: Omar,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-07 13:47:39
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-07 13:47:39
Esto funciona para mí:
$.mobile.pageContainer.pagecontainer('change', nextPage, {
transition: 'flow',
reload : true
});
Nextpage: es la URL del ejemplo nextpage (var nextPage = 'nextPage.html')
4
Author: Eagle_one,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-14 10:20:38
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-14 10:20:38