IBM Worklight - $(“#pagePort”).load() not working in Windows Phone 8

送分小仙女□ 提交于 2019-12-04 06:32:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!