4

の逆動作は可能$(this)ですか?

したがって、this要素を取得する代わりに、一致する.sb-popular-thumb aが除外するすべてのものを取得します$(this)?

以下の例のコードを参照してください。私が達成しようとしていることを見ることができるように、私は でマーク$(this)しました。$(reverse)

$('.sb-popular-thumb a').hover(
  function () {

    $('.sb-popular').stop().animate({
        height : '168px'                    
    }, 200);

    $(this).siblings('.sb-popular-thumb-title').show();

    $(reverse).siblings('.sb-popular-thumb-overlay').stop().fadeIn(200);

  },
  function () {

    $('.sb-popular').stop().animate({
        height : '140px'                    
    }, 200);

    $(this).siblings('.sb-popular-thumb-title').hide();

    $(reverse).siblings('.sb-popular-thumb-overlay').stop().fadeOut(200);

});
4

3 に答える 3

2

.not()指定したものはすべて検索から除外します。

したがって.not(this)、これを除外します。

于 2012-07-30T11:21:24.443 に答える