Skip to content

Instantly share code, notes, and snippets.

@riix
Created July 27, 2012 08:56
Show Gist options
  • Save riix/3186916 to your computer and use it in GitHub Desktop.
Save riix/3186916 to your computer and use it in GitHub Desktop.
GNB init.
var gnb = $('#gnb');
var gnbList = $('#gnb > ul > li');
var snb = $('.snb');
var start = 0;
var end = 0;
timer = setInterval(function(){
$(".tt").text(start+" = "+end);
if(start == 1 && end == 1){
snb.slideUp(200 , function(){start = 0;});
};
},500);
gnb.mouseenter(function(){
end = 0;
if(start == 0){
snb.slideDown(200 , function(){start = 1;});
};
}).mouseleave(function(){;
end = 1;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment