I've been trying to add a class to each list item based on their content:
$('.cl-tags').children('li').addClass( $(this).val() );
From
<ul class="cl-tags">
<li>Green</li>
<li>Red</li>
<li>BLue</li>
<li>Yellow</li>
</ul>
to
<ul class="cl-tags">
<li class"Green">Green</li>
...
Apparently jQuery throws an error, is there other way of doing this?