开发者

jquery slideUp/ slideDown xui equivalent

开发者 https://www.devze.com 2023-02-08 14:50 出处:网络
Hello im trying to create the same effect of jQuery\'s slideUp and slideDown function with [xui]http://xuijs.com)

Hello im trying to create the same effect of jQuery's slideUp and slideDown function with [xui]http://xuijs.com)

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. 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 :)


Why not use a fadeOut on the padding & border, or set them to auto or none...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号