jQuery - Why is my jquery hide/show code not working
<p>I have this painfully simple jquery code, or so I thought, but it doesn't function as expcted</p>

<p>All i want is, <strong>if value selected from dropdown = 'Poster', hide all the fieldsets, then show the one(s) I select.  If value selected from dropdown = 'Logo', hide all the fieldsets, then show the one(s) I select and so on</strong>. Simple I know, but the fieldsets will not always hide as they should.  </p>

<p>For example, if I select '<strong>Logo</strong>' from the down, only <strong>one</strong> fieldset should display, this works, then if I select '<strong>booklet</strong>', several field-sets should display and this works, but if I go back and select logo again, all the field-sets remain instead of hiding all and then showing on the one needed for the project type 'Logo'.  </p>

<p>Can anyone see what I am doing wrong?  <strong>Note</strong>:  On change of project type dropdown field, the projectTypeChange() is called</p>

<pre><code>function projectTypeChange()
{
        $(document).ready(function() {
        $('fieldset#section-960', 'fieldset#section-961', 'fieldset#section-962', 'fieldset#section-964', 'fieldset#section-967').hide();
        var dropVal = $('select#6211').val();

       if(dropVal ==  "Poster")
           {
              $('fieldset#section-960', 'fieldset#section-961', 'fieldset#section-962', 'fieldset#section-964', 'fieldset#section-967').hide();
              $('fieldset#section-960').show(); 
              $('fieldset#section-961').show(); 
              $('fieldset#section-967').show(); 
              $('fieldset#section-962').show(); 
           }
       if(dropVal ==  "Booklet")
           {
              $('fieldset#section-960', 'fieldset#section-961', 'fieldset#section-962', 'fieldset#section-964', 'fieldset#section-967').hide();
              $('fieldset#section-960').show(); 
              $('fieldset#section-961').show(); 
              $('fieldset#section-967').show(); 
              $('fieldset#section-962').show(); 
              $('fieldset#section-964').show(); 
           }
       if(dropVal ==  "Logo")
           {
              $('fieldset#section-960', 'fieldset#section-961', 'fieldset#section-962', 'fieldset#section-964', 'fieldset#section-967').hide();
              $('fieldset#section-962').show(); 
           }

        });
}
</code></pre>
