Javascript 从右向左切换
使用AlloyUIJavascript 从右向左切换,javascript,yui,yui3,alloy-ui,Javascript,Yui,Yui3,Alloy Ui,使用AlloyUIToggler,是否可以将div从右向左切换,而不是标准的down->up?我已经检查了方向,但找不到任何类型的切换方向 这是我当前的切换程序代码: new Y.Toggler({ animated : true, closeAllOnExpand : true, container : '#mySearchForm', content : '.content', expanded : false, header : '.head
Toggler
,是否可以将div从右向左切换,而不是标准的down->up?我已经检查了方向,但找不到任何类型的切换方向
这是我当前的切换程序
代码:
new Y.Toggler({
animated : true,
closeAllOnExpand : true,
container : '#mySearchForm',
content : '.content',
expanded : false,
header : '.header',
transition : {
duration : 0.2,
easing : 'cubic-bezier(0, 0.1, 0, 1)'
}//always toggles from the bottom->up
});
要使
切换器
水平切换,您需要做3件事:
Toggler
元素,使Toggler
水平动画:true,
更改为:
animated: {
to: { right : '300px' }
},
注意:您可能需要调整像素的确切数量