Created
April 6, 2010 03:30
-
-
Save artlung/357195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LAAL = { | |
init : function() { | |
var that = this; | |
$('#MenuText ul li a').bind('mouseover', function() { | |
var id = '#show_' + $(this).parents('li:first').attr('id').split('_')[1]; | |
var offset = $(this).parents('li:first').offset(); | |
$('.subMenu').hide(); | |
if (!$(this).parents('li:first').hasClass('noMenu')) { | |
that.showMenu(id, offset); | |
} | |
}); | |
$('#MenuText ul li span').bind('click', function() { | |
var id = '#show_' + $(this).parents('li:first').attr('id').split('_')[1]; | |
var offset = $(this).parents('li:first').offset(); | |
$('.subMenu').hide(); | |
if (!$(this).parents('li:first').hasClass('noMenu')) { | |
that.showMenu(id, offset); | |
} | |
}); | |
$('.subMenu').bind('click', function() { | |
$(this).fadeOut(); | |
}); | |
}, | |
showMenu : function (id, offset) { | |
$(id).css({ top: offset.top - 20, | |
left: (offset.left + 152) | |
}).fadeIn(); | |
} | |
}; | |
jQuery(document).ready(function(){ | |
LAAL.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment