Taking a comma separated list and creating a unordered list

Posted by mmsa on Stack Overflow See other posts from Stack Overflow or by mmsa
Published on 2010-04-07T00:29:35Z Indexed on 2010/04/07 0:33 UTC
Read the original article Hit count: 317

Filed under:

I've got a simple list which is generated by a checkbox list. The generated code is simply this

white,blue,red,black

I need to use jquery to wrap each of these elements in a < li > tag. How do you go through the list and use the comma as a separator? I also will need to delete the comma. Sometime there will be 1 item, sometimes 3, etc.

Thanks in advance!

© Stack Overflow or respective owner

Related posts about jQuery