title: sub nav is not sliding down correctly
body: <p>I am trying to create an instant search using jQuery and ajax .and somehow it's working fine but I used a sub nav to display the results. The problem is that the subnav is sliding down but its getting disappear when it shouldn't.</p>
  
  <p><strong>Html</strong></p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;
  &lt;form&gt;
  
    &lt;input type="text" id="keyword"&gt;
  
  &lt;/form&gt;
  &lt;ul class="subnav"&gt;
  
  &lt;/ul&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p><strong>jquery:-</strong></p>
  
  <pre><code>$(document).ready(function() {
  
          if ($(this).val().length != "") {
  
              $('.submenu').slideDown()
  
              $.ajax({
  
                  type: "POST",
  
                  url: "test.php",
  
                  data: 'keyword=' + $(this).val(),
  
                  success: function(data) {
  
                      $('.submenu').html(data);
  
                  } else {
  
                      $('.submenu').slideUp()
                  }
  
              })
          });
  </code></pre>
  
  <p>css: 
      .submenu     {<br>
      width:165px;
      background:#F30;
      position:absolute;
      display:none;
      }</p>
  
  <p>when I mention height in the css it works fine but without height its not working ..and sorry for not organising the code .it is hard for me to do that on phone ..</p>
  
  <p>thanks in advanced</p>