I\'m using labels for my form, like this :
Instead of binding with the click()
event, you should bind using the change()
event, then however this change is triggered the outcome will be the same:
$('#foo').change(
function(){
// do whatever
});
References:
The change event should fire for the input
whether the label
or input
is clicked:
$("#foo").change(function () { ... });
Example http://jsfiddle.net/andrewwhitaker/6LMXW/