title: Getting Value From Jquery Mobile Radio Button - Works On JSFiddle But Not In The HTML File
body: <p>I've been working on a number of ways to do this and I'm now convinced there is some thing I am missing as my code works fine on JSfiddle - <a href="http://jsfiddle.net/ccsnet/dK7NX/5/" rel="nofollow">http://jsfiddle.net/ccsnet/dK7NX/5/</a></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="eventscontent" data-role="content"&gt;
  
              &lt;div id="eventlistcontrolsdiv1" align="center" &gt;
                &lt;form id="eventlistcontrols" name="eventlistcontrols" class="eventlistcontrols" method="post" action=""&gt;
                    &lt;div id="eventlistbutton" align="center"&gt;
                        &lt;div data-role="fieldcontain"&gt;
                            &lt;fieldset data-role="controlgroup" data-type="horizontal" &gt;
                            &lt;input id="bydistance" type="radio" name="eventsortby" checked="true" /&gt;
                            &lt;label for="bydistance"&gt;By Distance&lt;/label&gt;
                            &lt;input id="bytype" type="radio" name="eventsortby" /&gt;
                            &lt;label for="bytype"&gt;By Type&lt;/label&gt;
                            &lt;input id="byimpact" type="radio" name="eventsortby" /&gt;
                            &lt;label for="byimpact"&gt;By Impact&lt;/label&gt;
                            &lt;/fieldset&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;​
  
  
  $(document).ready(function() {
      $(function() {
          $("input[name='eventsortby']").click(function() {
              alert($("input[name=eventsortby]:radio:checked").attr("id"));
          })
  
      });
  });
  </code></pre>
  
  <p>What I don't understand is why this should be the case. The only differences are that I have the javascript in a separate file to the html form but I thought I was referencing it correctly. I have tried doing...</p>
  
  <pre class="lang-js prettyprint-override"><code>input[name=document.eventlistcontrols.eventsortby]
  </code></pre>
  
  <p>... how ever this did not work either....</p>
  
  <p>Can any one see what I am not doing correctly ?</p>
  
  <p>Thanks</p>
  
  <p>Terran</p>