title: jQuery to get Hidden Field Value in Table Row
body: <p>I have a table with a hidden field in each row. I need to Alert the value of hidden field when a button in that row is clicked. I have the following jQuery code. But it does not work. How do we make it work?</p>
  
  <p>CODE: <a href="http://jsfiddle.net/Lijo/xWanB/" rel="nofollow">http://jsfiddle.net/Lijo/xWanB/</a></p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function () {
  
          //"Show ID" for Associate Button Click
          $('.resultGridTable tr &gt; td &gt; .actionButtonNational').click(function () {
              //"this" means show ID button
              //Traversing to get the parent row and then the required columns in the row
              var associateID = $(this).parents('tr:first &gt; .wrapperDivHidden input[type=hidden]').val();
              alert(associateID);
              return false;
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;td&gt;
      XXXXX
      &lt;input type="submit" name="ctl00$detailContentPlaceholder$grdSubscribedAssociates$ctl04$btnNational"
                          value="Show ID" id="detailContentPlaceholder_grdSubscribedAssociates_btnNational_2"
                          class="actionButtonNational" style="color: White; background-color: #A7A7A6;
                          font-weight: bold; width: 60px" /&gt;
      &lt;div id="wrapperDivHidden" class="wrapperDivHidden"&gt;
          &lt;input type="hidden" name="ctl00$detailContentPlaceholder$grdSubscribedAssociates$ctl04$hdnAssociateID"
                              id="detailContentPlaceholder_grdSubscribedAssociates_hdnAssociateID_2"value="789345680" /&gt;
      &lt;/div&gt;
  &lt;/td&gt;
  </code></pre>