Skip to content Skip to sidebar Skip to footer

Removing Autoload Of Dropdown Menu

In my page i have set calendar as dropdown but it automatically loads in start up my code is like this

There you go... Works fine and made in bootstrap. There are literally hundreds of versions of this.


Solution 2:

You can try this code:

$(document).ready(function() { 
   $('.dropdown-menu').hide();
});

So, Then you can show on click datepicker.


Solution 3:

I have changed the code to

<li class="dropdown"> 
<input type="text" class="form-control dropdown-toggle" data-toggle="dropdown"   data-hover="dropdown" name="txtEnds" id="txtEnds" required onclick="showmydiv();">
<ul class="dropdown-menu" >
    <li><div id="showDates" style="display:none;"></div></li>
</ul>
</li>

<script>
    function showmydiv(){
       document.getElementById('showDates').style.display = "block";
      }
</script>

This one worked properly


Post a Comment for "Removing Autoload Of Dropdown Menu"