When using the 'this' keyword in jQuery, what is the syntax for adding basic filters.
For example:
$(this):contains('foo')
$(this):visible OR $(this:visible)
For Searching for items within this:
$(':visible, any-selector', this)
$(this).find(':visible, any-selector')
if you want a true or false return:
if($(this).is(':visible, any-selector')){
alert('this is visible, or matches "any-selector"');
}
else{
alert('this is hidden, or doesn\'t match "any-selector"');
}
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