How to binding dropdown in html5 page using jquery? -


i need know code binding drop down in html5 using jquery.

try this::

     <ul class="mian-nav">             <li class="has-dropdown">1                  <ul class="subnav">                     <li class="has-dropdown">1.1</li>                     <li class="has-dropdown">1.2</li>                   </ul>             </li>             <li class="has-dropdown">2</li>             <li class="has-dropdown">3</li>         </ul> 

jquery::

<script> jquery(document).ready(function(){  jquery(".subnav").hide();  jquery(".has-dropdown").click(function(){    jquery(this).children('.subnav').toggle();  }); }); </script> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -