Reputation: 5761
I would like to check if an element has not a specific class applied. Is this correct?
if($('#tabs_wrapper li').hasClass:not('enabled')){
$('.inner_tabs div').css('display', 'none');
}
Upvotes: 1
Views: 213
Reputation: 123377
just an alternative
if ($('#tabs_wrapper li:not(".enabled")').length) {
/* ... */
}
Upvotes: 1
Reputation: 382102
You may do this :
if (!$('#tabs_wrapper li').is('.enabled')){
$('.inner_tabs div').css('display', 'none');
}
Upvotes: 1