简体   繁体   中英

jQuery Mobile changePage not working with data-prefetch

jQuery mobile change page event not working in internal pages

  $.mobile.changePage('xyz.html');

if i use data-prefetch in any url.

Can anyone help me to solve ?

If I understood you correctly this has nothing to do with data prefetch. If you pretetch another HTML file with multiple internal pages only first internal page will be loaded, everything else is going to be discarded, including HEAD part of a mentioned HTML file.

There are two good article talking about this situation, here and here , to be transparent it is my personal blog.

In a few words, only first (original) HTML file should have more then one internal page, usually pages most commonly used. Everything else should be in external HTML files just to prevent large DOM size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM