Multiple show / hide jquery
<p>My code below is showing the proper city/state div's when the matching country is selected from the drop down, but it's not hiding the previous one if the user decides to select another state. Do I have to create an if/else each for each div i want to hide?</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
...
//city &amp; state display 

   $("#ctry").change(function() {
      $(".state").hide();

      var stateSelect = $("#state_" + $(this).val());

      if (stateSelect.length === 0)
         $("#state_label").hide(); 
      else {
         $("#state_label").show();
         stateSelect.show();
      }       
   });     
});
&lt;/script&gt;
</code></pre>

<p>html code:</p>

<pre><code>    &lt;label&gt;Country/Locale:&lt;/label&gt;
        &lt;select id="ctry" name="country"&gt;
        &lt;option value=""&gt;-- Select&lt;/option&gt;
        &lt;option value="US"&gt;United States&lt;/option&gt;
        &lt;option value="CA"&gt;Canada&lt;/option&gt;
        &lt;option value="GB"&gt;United Kingdom&lt;/option&gt;        
        &lt;option value="AU"&gt;Australia&lt;/option&gt;       
        &lt;/select&gt;&lt;br /&gt; 

&lt;!-- US --&gt;        
    &lt;div id="state_US" style="display:none"&gt;
    &lt;label id="state_label" style="display:none"&gt;State:&lt;/label&gt;
    &lt;span class="rstate"&gt;
        &lt;select name="u_state"&gt;
        &lt;option value=""&gt;-- State US&lt;/option&gt;
        &lt;option value="AL"&gt;Alabama&lt;/option&gt;
        &lt;/select&gt;
    &lt;/span&gt;
    &amp;nbsp;&amp;nbsp;Zip or City:&lt;input style="margin-left:43px;" type="text" name="locus" id="locus" size="30" /&gt;
    &lt;/div&gt;

&lt;!-- CA --&gt;   
    &lt;div id="state_CA" style="display:none"&gt;
    &lt;label id="state_label" style="display:none"&gt;Province:&lt;/label&gt;
    &lt;span class="rstate"&gt;
        &lt;select name="c_state"&gt;
        &lt;option value=""&gt;-- Prov CA&lt;/option&gt;
        &lt;option value="ON"&gt;Windsor&lt;/option&gt;
        &lt;/select&gt;
    &lt;/span&gt;
    &amp;nbsp;&amp;nbsp;Postal or Place:&lt;input style="margin-left:43px;" type="text" name="locca" id="locca" size="30" /&gt;
    &lt;/div&gt;

&lt;!-- GB --&gt;
    &lt;div id="state_GB" style="display:none"&gt;
        &lt;label id="state_label" style="display:none"&gt;City or Region:&lt;/label&gt;
        &lt;span class="rstate"&gt;
            &lt;select name="k_state"&gt;
            &lt;option value=""&gt;-- Place&lt;/option&gt;
            &lt;option value="AU"&gt;UK!&lt;/option&gt;
            &lt;/select&gt;
        &lt;/span&gt;
    &lt;/div&gt;

&lt;!-- AU --&gt;
    &lt;div id="state_AU" style="display:none"&gt;
        &lt;label id="state_label" style="display:none"&gt;City or Region:&lt;/label&gt;
        &lt;span class="rstate"&gt;
            &lt;select name="a_state"&gt;
            &lt;option value=""&gt;-- Place&lt;/option&gt;
            &lt;option value="AU"&gt;UK!&lt;/option&gt;
            &lt;/select&gt;
        &lt;/span&gt;
    &lt;/div&gt;
</code></pre>
