Looking for moving a class name of an image to it containing a shape element using jQuery ...
<figure class="wp-caption">
<img class="imghvr-hinge-up" src="image.jpg">
<figcaption >A sample caption</figcaption>
</figure>
In particular, I would like to move any class name of the img tag starting with 'imghvr-' to it containing the figure if the contained figure has the class name 'wp-caption'. The result will look like this:
<figure class="wp-caption imghvr-hinge-up">
<img class="" src="image.jpg">
<figcaption >A sample caption</figcaption>
</figure>
Hope this makes sense!) Any help would be greatly appreciated!
source
share