I have the following code:
<div class="product">
<div class="description"></div>
<div class="image"></div>
</div>
<div class="product">
<div class="description"></div>
<div class="image"></div>
</div>
<div class="product">
<div class="description"></div>
<div class="image"></div>
</div>
And Im trying to select all .image elements and move them before each .product element.
When I use the following command, it takes all the images and moves them before the first .product. Im stuck, I tried a foreach - that didnt seem to work.
$('.product').before($('.image'));
Any ideas?