$('fieldset.one label, fieldset.two label').each(function () {
var className = $(this).text().trim().toLowerCase();
$(this).addClass('default ' + className);
});
I'm adding classes dynamically to label elements, but when I try to style them, there is no effect. One of them has .sedan class added automatically, I see it in firebug, but the following doesn't have any effect:
.sedan {
display:none !important;
}
HTML:
<fieldset class="one">
<label>sedan</label>
<label>suv</label>
<label>truck</label>
</fieldset>
<fieldset class="two">
<label>sedan</label>
<label>suv</label>
<label>truck</label>
</fieldset>