使用 jQuery Mobile,我可以像这样手动预取外部页面:
$.mobile.loadPage(
"content.html",
{ showLoadMsg: true }
);
但是我如何手动从内存中删除该页面?从某种意义上说,“卸载”它?
谢谢
最佳答案
在您的 jqm 页面上,如果指定了 id
,您可以这样做。
$('#page2').remove();
另一种方法是使用$.fn.jqmData(), $.fn.jqmRemoveData()
引用here
关于javascript - 使用 jQuery Mobile 卸载预取页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11218674/