I can\'t seem to get the appendTo to work. What do I do wrong?
$(\'div:nth-child(2n) img\').appendTo(parent);
Current markup:
&
I made a little example and I hope you mean the same thing...
$(document).ready(function() { $('.container > img').each(function() { $(this).parent().append(this); }); });