title: How to change a hidden value based on the class it has
body: <p>I have some markup:</p>
  
  <pre><code>    &lt;table&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;input type="hidden" class="deleted" value="False" /&gt;
                  &lt;input type="button" class="rtButton" value="RT" /&gt;
              &lt;/td&gt;                               
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;input type="hidden" class="deleted" value="False" /&gt;
                  &lt;input type="button" class="rtButton" value="RT" /&gt;
              &lt;/td&gt;                               
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;input type="hidden" class="deleted" value="False" /&gt;
                  &lt;input type="button" class="rtButton" value="RT" /&gt;
              &lt;/td&gt;                               
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>What I'm wanting to happen is when an rtButton is clicked the value of just the hidden input within the same td is changed to true.</p>
  
  <p>I tried to achieve this with:</p>
  
  <pre><code>$(function(){
  
      $('.rtButton').click(function () {
          $(this).closest('input.deleted').val("True");
          alert( $(this).closest('input.deleted').val())
              });
  
  
  });
  </code></pre>
  
  <p>However it can't seem to set the value.</p>