jQuery Mobile导航还是changePage? [英] jQuery Mobile navigate or changePage?

查看:65
本文介绍了jQuery Mobile导航还是changePage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着jQuery Mobile 1.3的到来,添加了.navigate()函数.我听说这是更改页面的推荐方法,看来它们解决了在页面之间传输数据的问题.

With the arrival of jQuery Mobile 1.3, the .navigate() function has been added. I've heard that is the recommended way to change pages, and it seems they addressed the issues of transferring data between pages.

问题是,由于已经简化,因此我该如何访问changePage提供的其他选项?我真的很想使用.navigate()的{data}部分,但我也想设置一些通常与changePage一起使用的选项(例如过渡,方向等).

The problem is, since it has been simplified, how do I access the other options that changePage offered? I would really like to use the {data} portion of the .navigate() but I would also like to set a few options that I do normally with changePage (such as transition, direction, etc).

我目前有一个路由器",它监听所有导航事件,然后将接收到的所有数据传递到下一页(还执行其他一些简单的逻辑,例如设置视图控制器).

I currently have a "router" that listens for all navigate events, then passes along any data that it receives on to the next page (doing some other simple logic as well, like setting up the views controller).

[,options]中是否有一些隐藏的属性,我可以设置诸如方向和过渡之类的简单内容?

Is there some hidden properties in the [,options] that I would be able to set up simple things like direction and transition?

推荐答案

$.mobile.navigate 仍然是一个新功能,根据代码注释,它仍在进行中.

$.mobile.navigate is still a new function, according to code comments it is also a work in progress.

隐藏选项之间的转换处于活动状态; <​​/p>

Transition is active among hidden options;

$.mobile.navigate( "#bar", { transition : "slide", info: "info about the #bar hash" });

工作示例: http://jsfiddle.net/Gajotres/g5vAN/

另一方面,仍未实现反向更改,将应用默认的false值.

On the other hand, change to direction reverse is still not implemented, default false value is applied.

这篇关于jQuery Mobile导航还是changePage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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