Am I just going the wrong way? Should I switch to normal loop, or an each loop? Comments?
$(".a")
   .each(function(i){
$(this).wrap('<div class="outter ' +$(this).attr("class")+ '"></div>')
      .removeClass().addClass("z");
});

Here's my attempt. It works. Is there a better/different way, perhaps not using the each, but simply chaining?

Reply via email to