I believe that you will need .each () of them to process them individually. What the code is currently doing is capturing all of them and cloning them after all of them. Instead, you want to process each one individually and insert the clone after the original after changing the classes as desired.
$(document).ready(function(){ $('div.reflection').each(function () { var org = $(this), clone = org.clone(); clone.removeClass('reflection').addClass('reflected') .insertAfter(org); }); });
source share