<div class="a-1">
<div class="a-2">
<div class="a-3">
<div class="a-1 a-2">
<div class="a-2 a-3">
<div class="a-1 a-3">
<div class="a-1 a-2 a-3">
I am looking to do something like this:
$('.a-1').show().siblings([all those that do not belong to a-1]).hide();
Is there anyway to achieve this? The :not() selector seems to be failing me because it’s selecting the inverse of each element individually, resulting in a selection of all 7 DIVs.
Not sure what your issue with
:not()was but this should work fine: