[英]jquery mobile change transition of a specified element
I have a index.html. 我有一个index.html。 In this side are all sites.
这边是所有站点。 Now in my javascript file I have defined that the
dafaultPageTransition = "slide"
. 现在,在我的JavaScript文件中,我已经定义了
dafaultPageTransition = "slide"
。 I have made a popup and changed the transition to pop. 我做了一个弹出窗口,并将过渡更改为弹出。 That it pop's out with
data-transition="pop"
, but it still slides. 它弹出与
data-transition="pop"
,但它仍然滑动。
javascritp javascritp
$(document).on('mobileinit', function () {
// settings
$.mobile.ignoreContentEnabled = true;
$.mobile.defaultPageTransition = "slide";
});
html html
<a href="#popupBasic" data-rel="popup" data-role="button" data-transition="pop" data-inline="true" data-transition="pop" data-iconpos="notext" data-icon="plus"></a>
<div data-role="popup" id="popupBasic">
<h1>Add your Pattern</h1>
<input type="text" alt="pattern" placeholder="Your Pattern">
</div>
Could anyone helps me? 有人可以帮我吗?
In doc: http://jquerymobile.com/demos/1.2.0/docs/pages/popup/ 在文档中: http : //jquerymobile.com/demos/1.2.0/docs/pages/popup/
By default, popups have no transition to make them open as quickly as possible. 默认情况下,弹出窗口没有过渡,可以使其尽快打开。 To set the transition used for a popup, add the data-transition attribute to the link that references the popup.
要设置用于弹出窗口的过渡,请将data-transition属性添加到引用该弹出窗口的链接。 The reverse version of the transition will be used when closing the popup.
关闭弹出窗口时,将使用过渡的相反版本。
<a href="#transitionExample" data-transition="flip" data-rel="popup">
Flip transition
</a>
In your HTML the tag data-transition is duplicated. 在您的HTML中,标记数据转换是重复的。 Can this be the problem?
这可能是问题吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.