Reputation: 2701
I am trying to grab the div
elements that do not have a specific class, called active
.
So the code is:
$(currentContainerDiv).addClass('active');
Now, the currentContainerDiv
also has a class slidingDiv
and now I want to grab all other other
div
s with the class of slidingDiv
which don't have active
attached.
How to achieve this?
I tried this but it didn't work:
$('.slidingDiv').not(currentContainerDiv).removeClass('bottomed');
Upvotes: 0
Views: 43
Reputation: 550
TRy this:
$('.slidingDiv:not(.active)').removeClass('bottomed');
As you have stated "currentContainerDiv" also have class="slidingDiv". So no need to add filter for this.
Upvotes: 2