I have a simple layout like this...
<div class="container">
<div class="row" id="234">
<div class="left special">
This is left content
</div>
<div class="right">
This is right content
</div>
</div>
<div class="row" id="944">
<div class="left">
This is left content
</div>
<div class="right">
This is right content
</div>
</div>
<div class="row" id="332">
<div class="left">
This is left content
</div>
<div class="right special">
This is right content
</div>
</div>
</div>
I am trying to use jQuery to target only the row ids that contain the special class within them. I have this so far
jQuery( ".row:has(.special)" ).addClass( "test" );
But it is not adding the test class, where am I going wrong?