<label>Hatchback <input type="checkbox" name="" /></label>
<label>Bike <input type="checkbox" name="" /></label>
<label>Sedan <input type="checkbox" name="" /></label>
<label>Scooter <input type="checkbox" name="" /></label>
<label>Coupe <input type="checkbox" name="" /></label>
<label>SUV <input type="checkbox" name="" /></label>
I'd like to grab the text in labels and apply them as class names.
This doesn't work:
var classname = $("fieldset.visual label").text();
$("fieldset.visual label").addClass(classname);