Reputation: 2751
I have
<div class="image-mask">
<img class="alignright" src="image.png" />
</div>
and I would like to use jQuery to move the class from the image to the parent div.
Thanks very much!!
Upvotes: 0
Views: 714
Reputation: 32532
This should work:
$('.alignright').removeClass('alignright').parent().addClass('alignright');
Upvotes: 5