Remove delay on menu close
This commit is contained in:
parent
02098bc079
commit
9c90563d1a
2 changed files with 14 additions and 22 deletions
10
assets/js/main.min.js
vendored
10
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
26
assets/js/plugins/jquery.greedy-navigation.js
vendored
26
assets/js/plugins/jquery.greedy-navigation.js
vendored
|
@ -63,21 +63,21 @@ $(document).ready(function() {
|
||||||
$btn.on("click", function() {
|
$btn.on("click", function() {
|
||||||
$hlinks.toggleClass("hidden");
|
$hlinks.toggleClass("hidden");
|
||||||
$(this).toggleClass("close");
|
$(this).toggleClass("close");
|
||||||
clearTimeout(timer);
|
// clearTimeout(timer);
|
||||||
});
|
});
|
||||||
|
|
||||||
$hlinks
|
// $hlinks
|
||||||
.on("mouseleave", function() {
|
// .on("mouseleave", function() {
|
||||||
// Mouse has left, start the timer
|
// // Mouse has left, start the timer
|
||||||
timer = setTimeout(function() {
|
// timer = setTimeout(function() {
|
||||||
$hlinks.addClass("hidden");
|
// $hlinks.addClass("hidden");
|
||||||
$btn.toggleClass("close");
|
// $btn.toggleClass("close");
|
||||||
}, closingTime);
|
// }, closingTime);
|
||||||
})
|
// })
|
||||||
.on("mouseenter", function() {
|
// .on("mouseenter", function() {
|
||||||
// Mouse is back, cancel the timer
|
// // Mouse is back, cancel the timer
|
||||||
clearTimeout(timer);
|
// clearTimeout(timer);
|
||||||
});
|
// });
|
||||||
|
|
||||||
check();
|
check();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue