【问题标题】:jQuery fade out variable and element by classjQuery 按类淡出变量和元素
【发布时间】:2011-09-15 00:11:55
【问题描述】:

无论如何要将两者都包含在一个函数中?我以为这会起作用,但它没有

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

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

【问题讨论】:

    标签: jquery class variables element fadeout


    【解决方案1】:

    这是通过add 方法完成的:

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

    【讨论】:

      猜你喜欢
      • 2011-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多