title: Get value of a dynamic radio button with jQuery
body: <p>I'm pretty much a total jquery noob I'm afraid! I'm sure this is a very simple thing but I can't seem to work it out.</p>
  
  <p>I'm trying to get the value of a dynamic, selected radio button.</p>
  
  <p>HTML...</p>
  
  <pre><code>&lt;div id="holder" class=""&gt;
  &lt;table id="qual-holder" class="table table-striped qual-table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Sector&lt;/th&gt;
              &lt;th&gt;Qualification Title&lt;/th&gt;
              &lt;th&gt;Cost&lt;/th&gt;
              &lt;th&gt;Confirm&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tr class="sector_qual"&gt;
          &lt;td&gt;OM207&lt;/td&gt;
          &lt;td&gt;Diploma in Children and Young People's Workforce Level 3&lt;/td&gt;
          &lt;td&gt;0&lt;/td&gt;
          &lt;td&gt;
              &lt;input name="qualification" id="28" type="radio" value="28" class=""&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="sector_qual"&gt;
          &lt;td&gt;OM207&lt;/td&gt;
          &lt;td&gt;Diploma in Children and Young People's Workforce&lt;/td&gt;
          &lt;td&gt;0&lt;/td&gt;
          &lt;td&gt;
              &lt;input name="qualification" id="29" type="radio" value="29" class=""&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tbody id="sector_quals"&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  &lt;div class="control-group spacing-top"&gt;
      &lt;label for="loan_value" class="control-label required"&gt;Amount to Borrow&lt;/label&gt;
      &lt;div class="controls"&gt;
          &lt;div class="input-prepend"&gt; &lt;span class="add-on"&gt;&lt;i class="icon-gbp"&gt;&lt;/i&gt;&lt;/span&gt;
  
              &lt;input class="input-small" placeholder="" name="loan_value" type="text" value="" id="loan_value"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>And my (rubbish) jQuery...</p>
  
  <pre><code>function updateAmount() {
      var selectedValue = "";
      var selected = $("input:radio[name='qualification']:checked");
      if (selected.length &gt; 0) {
          selectedValue = selected.val();
          alert('The radio button has been selected and the value is.' + selectedValue);
      }
  
  }
  
  updateAmount();
  </code></pre>
  
  <p>Can someone please tell me what I'm doing wrong?</p>
  
  <p>Thanks</p>