Difference between revisions of "Template:HSNU-TAIPEI/js/nav"
Line 15: | Line 15: | ||
var nav_bar = $("#top_menu_14"); | var nav_bar = $("#top_menu_14"); | ||
+ | var flag = true; | ||
nav_bar.hide(); | nav_bar.hide(); | ||
$(document).mousemove(function(event) { | $(document).mousemove(function(event) { | ||
− | if(event.pageY <= 20) { | + | if(event.pageY <= 20 && flag) { |
nav_bar.fadeIn(); | nav_bar.fadeIn(); | ||
+ | lastLessThan = true; | ||
} else { | } else { | ||
nav_bar.mouseleave(function() { | nav_bar.mouseleave(function() { | ||
+ | lastLessThan = false; | ||
$(this).fadeOut(); | $(this).fadeOut(); | ||
}); | }); |
Revision as of 14:35, 3 April 2015