开发者

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)

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜