title: how to hide and show text box according to select value using jquery
body: <p>i want to hide and show my text box according to drop down select value. if user select drop down value "other" then i want show my text box and hide drop down list and he can select any value except other my text box is hide plz help me and give me sample code my code is here  </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
    $( function () {
  
   if($("#subject").val()==="Other") {
       $("#Sub").show();
    $("#subject").hide();
  
    }
    else $("#Sub").hide(); 
      });
  </code></pre>
  
  <p></p>
  
  <pre><code>  &lt;tr&gt; &lt;td style="width: 470px"&gt;&lt;%:Html.DropDownList("subject",ViewData["sub"] as SelectList) %&gt; 
  
        &lt;input type ="text"  name="subject" id="Sub"style="width: 250px" /&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>i populated drop down list from data base </p>