[英]jquery slideUp/ slideDown xui equivalent
Hello im trying to create the same effect of jQuery's slideUp and slideDown function with [xui]http://xuijs.com) 您好,我正在尝试使用[xui] http://xuijs.com创建与jQuery的slideUp和slideDown函数相同的效果)
so far i have created the fade effect 到目前为止,我已经创建了淡入淡出效果
xui.extend({
fadeOut:function(dur, callback) {
this.tween({opacity:'0',duration:dur}, callback);
},
fadeIn:function(dur, callback) {
this.tween({opacity:'1',duration:dur}, callback);
}
});
which has been successful:) 已经成功了:)
But I am trying to master the slideUp/Down but have no luck. 但是我试图掌握slideUp / Down但没有运气。 I have tried: 我努力了:
slideUp:function(dur, callback) {
this.tween({height:'0',duration:dur}, callback);
}
which works on elements without padding and a border. 适用于没有填充和边框的元素。 Is there anybody who can help me solve this problem any advice will be greatly appreciated :) 有没有人可以帮助我解决这个问题,任何建议将不胜感激:)
为什么不在填充和边框上使用fadeOut,或将它们设置为auto或不设置...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.