Contact Us

|

FriendFeed FriendFeed

|

follow us on twitter Twitter

|

 Rss Feed

|

Favorites Add to Favorites

Sunday, January 9, 2011

Simple animated drop down menu using jquery

This tut will help you to have a simple animated drop down using jquery. Before using this please add the js file from jquery website. Refer the site http://jquery.com/ for more details. You can download the minified version or the developer version.

Once you download and include in the page then using the below steps.
HTML

<ul class="drospdown">
<li><a href="#">A Website #1</a></li>
<li><a href="#">A Website #2</a>
<ul>
<li><a href="#">Indoor</a></li>
<li><a href="#">Outdoor</a></li>
</ul>

</li>
<li><a href="#">A Link #1</a></li>
<li><a href="#">A Link #2</a></li>
<li><a href="#">A Website #3</a></li>
<li><a href="#">A Website #4</a></li>

<li><a href="#">A Link #3</a></li>
<li><a href="#">A Link #4</a></li>
</ul>

Javascript

function mainmenu(){
$(" .drospdown ul ").css({display: "none"}); // Opera Fix
$(" .drospdown li").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
},function(){
$(this).find('ul:first').slideUp(400);
});
}
$(document).ready(function(){
mainmenu();
});

this will give you an animated drop down menu...

Labels: , , , , ,

6 Comments:

Anonymous Anonymous said...

hiiii

January 13, 2012 at 3:50:00 AM PST  
Anonymous Tom said...

Thanks! This is exactly what I was looking for for my client's website.

August 14, 2012 at 8:38:00 AM PDT  
Blogger Vel Murugan said...

Thanks. It is very useful

September 5, 2012 at 12:13:00 AM PDT  
Anonymous Anonymous said...

Thank you so much ^^

March 11, 2013 at 11:45:00 PM PDT  
Blogger hero said...

very good work dear

April 16, 2013 at 3:42:00 AM PDT  
Anonymous Anonymous said...

no demo?

May 21, 2013 at 6:44:00 AM PDT  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home