use JQuery to get a list of classes

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-05-07T08:49:31Z Indexed on 2010/05/07 9:18 UTC
Read the original article Hit count: 230

Filed under:
|

Hi

I have a un-ordered (ul) html list. Each li item has 1 or more classes attached to it. I want to go through this ul list and get all the (distinct) classes. Then from this list create a list of checkboxes who's value matches that of the class and also who's label matches that of the class. One checkbox for each class.

What is the best way to do this using JQuery?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-selectors