I have multiple of the following elements:
<div class="item">
<div class="image">Image</div>
<div class="text">Text</div>
</div>
And what I need to do in jQuery is to swap them around, so that the text div is displayed before the image div.
This works fine using $('.text')insertBefore('.image') - but this doesn't work when I have multiple item divs.
They all need to be switched at the same time, is there any way to do this?
JSFiddle: https://jsfiddle.net/n2vnpd3n/