问题
I'm using $("#pagePort").load()
for navigating between pages in my app, and it's working in Android (both emulator & device) perfectly.
However, my app can't change its page when i tried to run it from Windows Phone 8's emulator.
回答1:
I have done the following in order to make the changePage functionality work in Windows Phone 8. I suspect this change will make many things "suddenly" work as well.
This change is supposed to be part of the next jQuery Mobile release at some point in time...
Please try it:
open jquery.mobile-1.x.x.js and refactor the code as follows:
- var uri = url ? this.parseUrl( url ) : location,
- hash = this.parseUrl( url || location.href ).hash;
+ var uri = this.parseUrl( url || location.href ),
+ hash = uri.hash;
and:
- return uri.protocol + "//" + uri.host + uri.pathname + uri.search + hash;
+ return uri.protocol + uri.doubleSlash + uri.host + uri.pathname + uri.search + hash;
来源:https://stackoverflow.com/questions/18491348/ibm-worklight-pageport-load-not-working-in-windows-phone-8