Why isn't this jQuery script working?
<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
  $("tr.reqDet").hide(); 

  $("[title='requestType']").change(function(){
    if ($("[title='requestType']").val()!=""){
        $("#reqDet").hide();
    } else {  
        $("#reqDet").show();  
    }
  });

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

<p>I cannot get the if statement in the script to work...</p>

<p>Details: I'm using SharePoint and it renders a dropdown box w/ attribute title="requestType". When the requestType box is NOT set to the initial value, which is "", I'd like for a control with the class "reqDet" to appear.</p>

<hr>

<p>Anyways, Thanks everyone. here's the solution that worked for me:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
  $("tr.reqDet").hide(); 

  $("select[title='requestType']").change(function(){
        $(".reqDet").toggle($(this).val()!== "");
  });
 });
&lt;/script&gt;
</code></pre>
