I have the following:
<div id="preview_invoice_container">
<table class="page_container">
<tr>
<td width="30%" id="position_0" class="box_container">
<div class="box_logo"></div>
</td>
<td width="30%" id="position_1">
<div class="box_logo"></div>
</td>
<td width="30%" id="position_2"></td>
</tr>
</table>
And I want to remove all occurences of the class=”box_logo” only inside the div=”preview_invoice_container”
I’ve tried the following : $('#preview_invoice_container').find('.box_logo').removeClass("box_logo");
But its not working. Any help will be appreciated.
.removeClass()actually removes the specified class from all matched elements, it doesn’t remove the elements themselves. I think what you want is: