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() {
|
||||
$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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue