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!!
这应该工作:
$('.alignright').removeClass('alignright').parent().addClass('alignright');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.