I must have looked at 10-15 tutorials on this already but just cannot get this to work, so in my .js I have:
jQuery('#sports : checkbox').click(function() {
alert('it works');
});
and in my .html doc I have:
<input type="checkbox" name="sports" />
It just won't work, no matter what I try and I have tried every variation I can come up with, the input checkbox isn't in a DIV or anything (but I am also curious how to reference it if it is in a div.. just for a control on this test, I have tried this and it works fine (where "testdiv" is a name of a DIV in my document:
jQuery('#testdiv').click(function() {
alert('it works');
});