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