how to display hide and show select box?
<p>I google a lot for my requirement.So i am posting this question.
       my requirement is when a user select a value from dropdown based on that value a div to be displayed. But in default all the divs with values to be displayed.</p>

<p>here is my code:</p>

<pre><code>&lt;select name="lab_1" id="title" &gt;
  &lt;option value="All" onclick="showAll();" &gt;All&lt;/option&gt;
  &lt;option value="one" onclick="showOther();"&gt;One&lt;/option&gt;
  &lt;option value="two" onclick="showOther();"&gt;Two&lt;/option&gt;    
&lt;/select&gt;
&lt;div id="All" &gt;
  hiihdhfhdf
  &lt;div id="otherTitle" style="display:none;" &gt;
    select
  &lt;/div&gt;
  &lt;div id="otherTitle2" style="display:none;" &gt;
    ramsai
  &lt;/div&gt;
&lt;/div&gt;

&lt;script type="text/javascript" src="../js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(function() {
$('#title').change(function() {
    var all= $("#All").val();
    alert('hi');
    if(all==""){
        $("#otherTitle").show();
        $("#otherTitle2").show();
      }
      else if (this.value == "one") {
        $("#otherTitle").show();
        $("#otherTitle2").hide();
      }
      else if (this.value=="two"){
        $("#otherTitle2").show();
        $("#otherTitle").hide();
      }     
    });
    });


&lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p>Here with above code when i click all my divs are not displaying but when i go to one or two options it is showing all the values.
I have 42 divs is there any other solution for all those divs in jquery or below mentioned are the only solutions for that</p>

<p>Thank you in advance</p>

<p>Ramsai</p>
