Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery dropdown menu animation
- <ul>
- <li>
- <a href="#">Parent link</a>
- <ul>
- <li><a href="#">Submenu link</a></li>
- </ul>
- </li>
- </ul>
- $(function(){
- $('#nav>li').hover(function() {
- $(this).closest('li').find('>ul').css({
- 'opacity': 0,
- 'margin-top': 15
- }).show().animate({
- 'margin-top': 0,
- 'opacity': 1
- }, 300);
- }, function() {
- $(this).closest('li').find('>ul').fadeOut(200, function() {
- $(this).hide();
- });
- });
- });
Add Comment
Please, Sign In to add comment