如何在jQuery Mobile的(1.4测试版),更改网页? [英] How to change page in jQuery mobile (1.4 beta)?

查看:184
本文介绍了如何在jQuery Mobile的(1.4测试版),更改网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在阅​​读文档的 $。mobile.changePage 已去precated。

I am reading the docs that $.mobile.changePage has been deprecated.

不过,这并不赞成我什么,或者什么可以改用说。

But it doesn't say in favor of what, or what can I use instead.

有一个新的API文档页面呢?

Is there a new API documentation page for this?

我用 $ mobile.changePage(index.html的,{reloadPage:真}); 但好像加入 reloadPage:真正的分页符

推荐答案

由于 jQuery Mobile的1.4 $。mobile.changePage()德是precated,取而代之的:

As of jQuery Mobile 1.4, $.mobile.changePage() is deprecated and replaced with:

$(":mobile-pagecontainer").pagecontainer("change", "target", { options });

缩短 ...

$.mobile.pageContainer.pagecontainer("change", "target", { options });

更短的... (1)

$("body").pagecontainer("change", "target", { options });

注意:目标的是#page_id或网址

Note: target is #page_id or URL.

演示

Demo

(1) <身体GT; pageContainer 的默认情况下,除非 $ .mobile.pageContainer 修改的 mobileinit


(1) <body> is pageContainer by default, unless $.mobile.pageContainer is modified on mobileinit.

这篇关于如何在jQuery Mobile的(1.4测试版),更改网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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