In addition to my previous question, I have a jQuery event that I want to fire when the checkbox and the shortcut itself are clicked.
jsFiddle here.
My problem is that when I click on the label, it does not start the function. The checkbox works fine, as you can see.
Can I add anything else? Or that?
Thank:)
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() {
$("#checkbox2, .akslabel").click(function() {
$("#scrollwrap").toggleClass('highlight');
});
});
source
share