因此,我试图实现的是,在手动创建页面更改时应用任何页面转换。
例如,在我的网页上,我将其设置为当用户向右滑动时,网站会转到第二个page....like
$('#firstPage').bind("swiperight", function(){
//alert("swiped right on the body element");
$.mobile.changePage('#secondPage');
});现在,我想将页面过渡附加到此函数。如果它是在一个实际的链接上,那么一个人会应用一个data-transition,但由于这个页面更改是手动创建的,我想知道如何在它后面附加一个过渡。
我试过举个例子
$('#firstPage').bind("swiperight", function(){
//alert("swiped right on the body element");
$.mobile.changePage('#secondPage','flip');
});等等,但都无济于事,有什么想法我该怎么做呢?在进阶时谢谢。
发布于 2012-08-21 11:19:20
尝试用on替换bind
$('#firstPage').on("swiperight", function(){
//alert("swiped right on the body element");
$.mobile.changePage('#secondPage','flip');
});我也遇到过类似的问题,这对我很有效。
https://stackoverflow.com/questions/12047993
复制相似问题