With a checkbox inside of a label, I was trying to toggle a class on the
label based on whether the input was checked or not. I tried every
permutation of:
$(".checkbox").change(function(){
$(this).parent().toggleClass('selected');
});
<label for="test"><input id="test" type="checkbox" class="checkbox
/>Test</label>
Tried both the dev and the current jquery. Any idea what I'm doing wrong?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/