I'd like to listen on the event of a user clicking on a checkbox's title (in addition to the checkbox itself). How can this be done?
A:
$('#myCheckbox').change(function(){ doStuff();});
$('#myCheckboxsLabel').click(function(){ doStuff();});
So long as you use the same doStuff() function for both, you should be ok
Jason
2010-05-28 21:32:39
A:
If <label for="id"> tags don't trigger your jQuery you may need a plugin to do it for you. Try labelify, I've heard good things (though not directly related to your question).
Matt S
2010-05-28 21:33:42