I want to insert a new div on all div s with class 'image', but with some exceptions.
$("<div>— hold to read</div>").appendTo('.image')
Between these I also have some divider images, also with .image class (added by Wordpress automatically), but which shouldn't have that <div> inside.
How can I write the above but with this exception? I can target the ones that need out based on a link with a title inside eg ('.image > a[title="divider-picture"]')
THIS SHOULD HAVE
<div class="image">
<a itemprop="image" title="main-picture" data-rel="prettyPhoto[single_pretty_photo]" href="#">
<img itemprop="image" src="#" alt="main">
</a>
<div class="img__label_layer">— hold to read</div>
<span class="holdtoview"><div class="actionin">TEXT</div></span>
</div>
THIS SHOULDN'T
<div class="image">
<a itemprop="image" title="divider-picture" data-rel="prettyPhoto[single_pretty_photo]" href="#">
<img itemprop="image" src="#" alt="div">
</a>
<div class="img__label_layer">— hold to read</div>
<span class="holdtoview"><div class="actionin">TEXT</div></span>
</div>
Thanks