Karl et al: Thank you for you helpful replies.
I'm trying to understand the above code example provided by Karl: var $flag = $('<div class="flag"></div>').insertBefore('p'); $flag.each(function (i) { ... I'm not sure this works? Is this supposed to be equivalent to: $("p").before("<div class='flag'></div>"); $(".flag").each(function (i) { ... Also, TT, thank you, firebug is exactly what I was looking for! -CJL