Removing images from div, and inserting into another.
Seems simple enough in theory. I have multiple divs, all with the class of "post". in the middle of those i have a blank div named "photoholder". All i'm trying to do is remove the images from any "post" div, and insert them into the nearest "photoholder" div. here's what i got which doesn't work at all:
$('.post').each(function() {
var wrap = $(this);
var hi = wrap.closest('.post').find('.photoholder');
wrap.find('img').each(function() {
var img = $(this);
img.remove().appendTo(hi);
});
});