Is it possible to perform the reverse action of $(this)
?
So instead of gettin the this
element, it gets everything matching .sb-popular-thumb a
but excluding $(this)
?
See code below of example. I have marked $(this)
with $(reverse)
so you can see what I am trying to achieve.
$('.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);
});
just use :
$('.sb-popular-thumb a').not(this)
.siblings('.sb-popular-thumb-overlay')
.stop()
.fadeIn(200);
It will get all the <a>
elements within that class except this
.
siblings()
will do almost the same, but will only get sibling elements (duh) ?
This will imitate your 'reverse'
$('.sb-popular-thumb a').not($(this));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With