IBM Worklight - $(&#pagePort")。load()在Windows Phone 8中不起作用 [英] IBM Worklight - $("#pagePort").load() not working in Windows Phone 8

查看:90
本文介绍了IBM Worklight - $(&#pagePort")。load()在Windows Phone 8中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 $(#pagePort)。load()用于在我的应用中的页面之间导航,并且它在Android中运行(包括模拟器和设备)完美。

I'm using $("#pagePort").load() for navigating between pages in my app, and it's working in Android (both emulator & device) perfectly.

然而,当我试图从Windows Phone 8的模拟器运行它时,我的应用程序无法更改其页面。

However, my app can't change its page when i tried to run it from Windows Phone 8's emulator.

推荐答案

为了使更改页面功能在Windows Phone 8中运行,我已经完成了以下操作。我怀疑这种更改会让很多东西突然起作用。

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.

这个改变应该是某个时间点下一个jQuery Mobile版本的一部分...

请试一试:

This change is supposed to be part of the next jQuery Mobile release at some point in time...
Please try it:

打开jquery.mobile-1.xxjs并重构代码如下:

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;

和:

-        return uri.protocol + "//" + uri.host + uri.pathname + uri.search + hash;
+        return uri.protocol + uri.doubleSlash + uri.host + uri.pathname + uri.search + hash;

这篇关于IBM Worklight - $(&#pagePort")。load()在Windows Phone 8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆