windows-phone-7 – jQuery Mobile changePage()无法在Windows P
发布时间:2020-12-13 20:33:47 所属栏目:Windows 来源:网络整理
导读:我正在使用Phonegap for Windows Phone 8开发一个应用程序. 我使用jQuery Mobile进行界面设计. $.mobile.changePage()不起作用.页面未被更改. 有没有其他方法来改变页面?是否还有其他框架来设计移动界面? $("#btnSearch").bind('click',function() { showS
我正在使用Phonegap for Windows Phone 8开发一个应用程序.
我使用jQuery Mobile进行界面设计. $.mobile.changePage()不起作用.页面未被更改. 有没有其他方法来改变页面?是否还有其他框架来设计移动界面? $("#btnSearch").bind('click',function() { showSpinner(); $.mobile.changePage("#pageSearch"); });
我认为这个问题与
here中描述的WP7相同.
检查路径问题: if($.mobile.path.getLocation("x-wmapp1:/app/www/index.html") != "x-wmapp1:/app/www/index.html") { console.log('there is path problem'); } else { console.log('everything is OK with paths'); } 解: 如github中所述,问题是WP7上的路径与其他平台不同.基本上在WP7上,getLocation打印带有双斜线的相对路径,这会导致首先出现此问题.要解决此问题,请打开jquery.mobile-1.3.1.js并重构以下内容: - 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; 进行此更改后,检查应显示“一切正常”. PS这是在WP7上测试的,完全修复了$.mobile.changePage()的问题. PS2这个问题在jQuery的github版本中得到修复,虽然我刚刚检查了最新的稳定版本(1.3.2),但不幸的是它没有修复. 问候, Hristo Todorov (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 本地 win7 与虚拟机Centos7 ping互通和Centos7 上网设置
- windows-server-2008 – 在没有SmartStart的HP Proliant服务
- windows-services – 卸载Windows服务时,已安装的产品与安装
- 远程连接提示要求的函数不受支持如何解决
- 使用’.NETFramework,Version = v4.6.1’恢复了包’Microso
- windows-server-2003 – 如何更改站点间拓扑生成器
- Windows GUI编程 – C SDK或C#Windows窗体
- Win32 C/C++从内存缓冲区加载图像
- 走进windows编程的世界-----消息处理函数(1)
- 为Windows 7构建自定义凭据提供程序
推荐文章
站长推荐
- windows-8 – 使用AngularJS for Windows Store
- Windows“iowait”CPU利用率报告
- windows – 使用批处理脚本检查环境中是否存在JA
- Win7减肥之删除休眠文件
- windows – 如何添加关闭脚本(不是通过使用gpedi
- windows-server-2012 – 将Windows Server 2012
- windows – 在我的应用程序激活之前检测哪些窗口
- 在Windows上的Visual Studio代码中调试C#代码
- windows-7 – InnoSetup – 编译签名工具失败,退
- 权限 – Microsoft Exchange Server权限洞察
热点阅读