title: Jquery Show/Hide Function not working
body: <p>I have been banging my head again and again for one simple problem which i just can't understand. I have bootstrap drop-down which is currently hidden when the page loads. I have linked the drop-down with text box. Drop-down opens on keyup function in text box. I have no issues with opening/Closing of the drop-down but the problem is the links in the drop-down aren't working for some reason i don't understand. I tried the same drop-down with normal button and it works fine. Any help will be highly appreciated. 
  Thank You.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;head&gt;
  
  &lt;meta charset="utf-8"&gt;  
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;  
  &lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt; 
  
  &lt;link href="http://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;  
  &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;style&gt;
  .mymenu{
  background-color:#efefef;
  height:40px;
   box-shadow: 2px 2px grey;
   margin-top:-7px;
  
  }
  .mymenu li{
  display:inline-block;
  padding:10px;
  color:#757575;
  font-family:lato;
  
  }
  
  #search{
  width:400px;
  height:26px;    
  }
  
  .dropdown-menu &gt; li{
  height: 5px;
  min-width:300px;
  }
  
  
  a:{
      text-decoration: none;
      color:gray;
  }
  a:link{
      text-decoration: none;
      color:gray;
  }
  a:visited{
      text-decoration: none;
      color:gray;
  }
  
  
  &lt;/style&gt;
  &lt;script&gt;
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="mymenu"&gt;
  &lt;li&gt; Home &lt;/li&gt;
  &lt;li class="dropdown lgmen"&gt;
  &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt; Top Sellers &lt;/a&gt;
  &lt;ul class="dropdown-menu"&gt;
              &lt;li&gt;&lt;a href="http://www.google.com"&gt;Google&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="http://www.yahoo.com"&gt;Yahoo&lt;/a&gt;&lt;/li&gt; 
        &lt;/ul&gt;
        &lt;/li&gt;
  &lt;li class="dropdown lgmen"&gt;
  &lt;input type="text" name="search" id="search" placeholder="Search Keyword..." autocomplete="off"&gt;
  
  &lt;ul class="dropdown-menu" id="mydrp" style="margin-left:10px;margin-right:10px;margin-top:-10px;"&gt;
              &lt;li&gt;&lt;a href="http://www.google.com"&gt;Google&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="http://www.yahoo.com"&gt;Yahoo&lt;/a&gt;&lt;/li&gt; 
              &lt;/ul&gt;
  
  
   &lt;/li&gt;
  
  
  &lt;/div&gt;
  
  &lt;script&gt;
  
  $("#search").keyup(function (event) {
     //preventing default behaviour of bootstrap
      event.stopPropagation();
  
      $("#mydrp").dropdown().show("slow");
      var ab=$("#search").val();
      if(ab == ""){
      $("#mydrp").dropdown().hide("slow");
      }
  });
  
  
  
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>