I have this piece of code:
<div class="quote-box-col14">
<label for="seo" class="quote-service-seo">SEO</label>
<input type="checkbox" name="seo" id="seo" value="Y" class="checkbox-seo" />
</div>
Someone can help with a JavaScript that adds class “selected” to when checkbox is selected?
Thanks
This jQuery will do it:
See this jQuery fiddle for a working example.
Edit:
If you need it to work in IE too, use the
clickevent instead: