Further to my previous question, I have a jQuery event that I want to fire when the checkbox and the label itself is clicked.
jsFiddle example here.
My problem is that when I click the label, it doesn't fire the function. The checkbox works fine, as you can see.
Is there anything more I can add? Or is this it?
Thanks :)
EDIT: code from jsFiddle link
HTML
<div id="scrollwrap">
<div>
<input value="1" type="checkbox" name="salgsvilkar" id="checkbox2" style="float:left;"/>
<label for="checkbox2" class="akslabel">Salgs og leveringsvilkår er lest og akseptert</label>
</div>
</div>
jQuery
$(function() {
//checkbox
$("#checkbox2, .akslabel").click(function() {
$("#scrollwrap").toggleClass('highlight');
});
});