You Can Use Below Code to Make A Simple Drop Down In HTML With The Help Of Jquery And CSS
***Jquery***
<script>
$(function(){
$('.DropDown > ul > li').on('click', function(){
$('.DropDown ul ul').slideUp();
$(this).children('ul').slideDown();
});
});
</script>
![<html>
<div class="DropDown">
<ul>
<li><a href="javascript:void(0);">ONE</a>
<ul class="First">
<li><a href="javascript:void(0);">1</a></li>
<li><a href="javascript:void(0);">2</a></li>
</ul>
</li>
<li><a href="javascript:void(0);">TWO</a>
<ul class="Second">
<li><a href="javascript:void(0);">3</a></li>
<li><a href="javascript:void(0);">4</a></li>
</ul>
<div class="clr"></div>
</li>
<li><a href="javascript:void(0);">THREE</a>
<ul class="Second">
<li><a href="javascript:void(0);">3</a></li>
<li><a href="javascript:void(0);">4</a></li>
</ul>
<div class="clr"></div>
</li>
</ul>
</div>
</html>][1]
For such more Blogs visit http://findnerd.com/NerdDigest
No comments:
Post a Comment