I have a structure like this:
- text1
- text2
- text3
kimstik was close, but not quite.
Here's how to do it in a convenient one-liner:
$.map( $('li'), function (element) { return $(element).text() });
Here's the full documentation for jQuery's map function, it's quite handy: http://api.jquery.com/jQuery.map/
Just to answer fully, here's the complete functionality you were looking for:
$.map( $('li'), function (element) { return $(element).text() }).join(', ');