title: Show hide fieldsets greater than/less than on select change
body: <p>I have a form which is going to contain 4 fieldsets. The user must fill in a minimum of 1 fieldset but can choose to complete additional fieldsets. Each fieldset's contents are identical.</p>
  
  <p>I want them to be able to choose a number of fieldsets to show from a dropdown. On selecting a number from the dropdown the relevant number of fieldsets appears. </p>
  
  <p>So if they choose 3 from the quantity dropdown, the first 3 fieldsets should be shown. If they change their mind and drop to 2 fieldsets then the 3rd should hide again.</p>
  
  <p>Here's the base HTML.</p>
  
  <pre><code>&lt;form&gt;
      &lt;select id="quantity" name="quantity"&gt;
          &lt;option disabled="disabled"&gt;xx&lt;/option&gt;
          &lt;option value="1"&gt;1&lt;/option&gt;
          &lt;option value="2"&gt;2&lt;/option&gt;
          &lt;option value="3"&gt;3&lt;/option&gt;
          &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;fieldset id="fieldset_name_1"&gt;Form Area 1&lt;/fieldset&gt;
      &lt;fieldset id="fieldset_name_2" style="display: none;"&gt;Form Area 2&lt;/fieldset&gt;
      &lt;fieldset id="fieldset_name_3" style="display: none;"&gt;Form Area 3&lt;/fieldset&gt;
      &lt;fieldset id="fieldset_name_4" style="display: none;"&gt;Form Area 4&lt;/fieldset&gt;
  
  &lt;/form&gt;​
  </code></pre>
  
  <p>And here's my <strong>very</strong> basic jQuery so far. I'm quite a noob to client side stuff, generally burying my head in php :)</p>
  
  <pre><code>var registerCount = function() {
      var qty = $(this).val();
  
      var fieldsets = $('fieldset');
  
      fieldsets.slice(0, qty ).show();  
  }
  
  
  $("#quantity").change(registerCount).keypress(registerCount);
  </code></pre>
  
  <p>So I've got it showing fieldsets correctly, I'm just not sure how to hide them on change or keypress again.</p>
  
  <p>I'm sure this is simple but I think my familiarity with PHP keeps me trying to code things completely differently to the jQuery/javascript way.</p>