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
Post a Comment