I have some HTML markup for a set of menu controls that is basically as follows. As you will note, the markup in each <div class="row">
repeats. This repeating code is that same for each menu control set.
<div id="menuModal">
<div class="row">
<div class="col-xs-6">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
<div class="col-xs-2">
<i>Control Icon</i>
<span>Control Label</span>
</div>
</div>
</div>
I'm setting the color of each div class="col-xs-6">
control label, EXCEPT for the first of these labels with the following jQuery selectors and method:
$( "#menuModal" ).find( "div.row > div.col-xs-6 > span" ).not( "div.row:eq(0) > div.col-xs-6 > span" ).css( "color", "#669900" );
The jQuery statement above sets the label color of EVERY div class="col-xs-6"
label, including the first one. I can't figure out why the .not
method selector won't work.
Any ideas? I'm banging my head on this...