I have the following radio buttons, none of which is checked by default.
<input type="radio" name="location" value="0" /> home
<input type="radio" name="location" value="1" /> work
<input type="radio" name="location" value="2" /> school
How do I detect when either of them is checked. I'm looking for something like click, but it's not working
$("input[name=location]").click(function(){
alert("selected");
});