我正在阅读 $.mobile.changePage
已被弃用的文档。
但它并没有说明赞成什么,或者我可以用什么来代替。
有新的 API 文档页面吗?
我曾经使用 $.mobile.changePage("index.html", {reloadPage:true});
但似乎添加 reloadPage:true
页面休息
最佳答案
自 jQuery Mobile 1.4 起,$.mobile.changePage()
已弃用并替换为:
$(":mobile-pagecontainer").pagecontainer("change", "target", { options });
缩短...
$.mobile.pageContainer.pagecontainer("change", "target", { options });
更短...(1)
$("body").pagecontainer("change", "target", { options });
注意:目标是#page_id 或 URL。
(1) <body>
默认情况下是 pageContainer,除非 $.mobile.pageContainer
在 mobileinit
上修改.
关于jquery - 如何在 jQuery Mobile (1.4 beta) 中更改页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19174611/