tags:

views:

22

answers:

1

I have a large body of text which has several sentences wrapped in yada

I'd like to find a way with JQUERY, to go through the entire body of text, and every time it find a span with class "findme", to take what ever copy is contianed between the tag and to append that to a UL as a LI

Ideas on how to do this efficiently?

THanks

+3  A: 

Simplest way to do this is using each():

$("span.findme").each(function() {
  $("<li>").text($(this).text()).appendTo("ul");
});
cletus
very nice. thxs
AnApprentice