开发者

jQuery fade out variable and element by class

Anyway to include both in a function? I imagined this would work, but it di开发者_Go百科dn't

var slide = $('.z:visible'),
    next  = slide.next();

$(next, '.h').fadeOut(400);
//as opposed to next.fadeOut(400); $('.h').fadeOut(400);


This is accomplished with the add method:

var slide = $('.z:visible');
slide.next().add('.h').fadeOut(400);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜