Skip to content

Instantly share code, notes, and snippets.

@stammy
Created February 26, 2009 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stammy/70558 to your computer and use it in GitHub Desktop.
Save stammy/70558 to your computer and use it in GitHub Desktop.
var submenuTimerId = 0;
var last_menu;
function submenuOver(id){
$(id+'_link').setStyle({zIndex:50});
$(id).appear({duration: 0.3});
clearTimeout(submenuTimerId);
if ( ( typeof( window[ 'last_menu' ] ) != "undefined" ) && !(id == last_menu) ){
submenuClose(last_menu);
}
}
function submenuOut(id){
last_menu = id;
submenuTimerId = setTimeout('submenuClose("'+id+'")', 2000);
}
function submenuClose(id){
$(id).hide();
$(id+'_link').setStyle({zIndex:'0'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment