Difference between revisions of "Template:HSNU-TAIPEI/js/nav"
Line 1: | Line 1: | ||
− | + | ||
<script> | <script> | ||
Line 30: | Line 30: | ||
</script> | </script> | ||
− |
Revision as of 14:40, 3 April 2015
<script>
var menu = $("#main-menu"),
showLeft = $(".showLeft"), menuButton = $(".menu-button");
function toggleMenu() {
menu.toggleClass("slide-menu-open"); menuButton.toggle();
}
showLeft.click(toggleMenu);
var nav_bar = $("#top_menu_14");
var flag = true;
nav_bar.hide();
$(document).mousemove(function(event) {
if(event.pageY <= 20 && flag) { nav_bar.fadeIn(); } else { nav_bar.mouseleave(function() { $(this).fadeOut(); }); }
});
</script>