title: jQuery button for toggling a dropdown Yes/No value for all the rows in a table
body: <p>I have a table which has a (Yes/No) dropdown menu for each row and I want to use a button to change the value of the dropdown to Yes using jQuery.
  This is what I was trying:
  HTML:</p>
  
  <pre><code>&lt;select name="activeFlag"&gt;
      &lt;option value="true"&gt;Yes&lt;/option&gt;
      &lt;option value="false"&gt;No&lt;/option&gt;
  &lt;/select&gt; 
  &lt;br /&gt;
  &lt;input type="button" value="Activate All" id="activateAllButton"&gt;
  </code></pre>
  
  <p>jQuery:    </p>
  
  <pre><code>$(document).ready(
          function()
          {
              jQuery('#activateAllButton').button();
              $('#activateAllButton').click(
              function() 
              {
                  $('select&gt;option:eq(0)').attr('selected', true);
              });
          });
  </code></pre>
  
  <p>Any help would be appreciated.</p>