Remove delay on menu close

This commit is contained in:
Michael Rose 2020-03-09 13:04:51 -04:00
parent 02098bc079
commit 9c90563d1a
2 changed files with 14 additions and 22 deletions

10
assets/js/main.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -63,21 +63,21 @@ $(document).ready(function() {
$btn.on("click", function() {
$hlinks.toggleClass("hidden");
$(this).toggleClass("close");
clearTimeout(timer);
// clearTimeout(timer);
});
$hlinks
.on("mouseleave", function() {
// Mouse has left, start the timer
timer = setTimeout(function() {
$hlinks.addClass("hidden");
$btn.toggleClass("close");
}, closingTime);
})
.on("mouseenter", function() {
// Mouse is back, cancel the timer
clearTimeout(timer);
});
// $hlinks
// .on("mouseleave", function() {
// // Mouse has left, start the timer
// timer = setTimeout(function() {
// $hlinks.addClass("hidden");
// $btn.toggleClass("close");
// }, closingTime);
// })
// .on("mouseenter", function() {
// // Mouse is back, cancel the timer
// clearTimeout(timer);
// });
check();
});