var str = []; var cnt = 0; $("li").each(function(){str[cnt] = $(this).text();cnt++;}); alert(str.join(";"));
this is the first thing that came to my head, probably a better way to do this. - jake On 5/21/07, SamCKayak <[EMAIL PROTECTED]> wrote:
I have an unordered list, each list element contains a radio button, and some text, e.g.: <li><input type="radio">This is some text in list element 1.</li> <li><input type="radio">This is some text in list element 2.</li> There can be from 1 to N list elements in the <ul>, what I need to do is concatenate the text into a semicolon delimited string to be passed to a database. The result string should look like: "This is some text in list element1.;This is some text in list element 2." Note that I need to remove the radio buttons from the list element text. Yes. I'm a jQuery newbie. Experienced in prototype.js. Sam