This repository has been archived on 2023-12-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ae75/www/backup/lib/jquery/menu.js
2020-11-02 15:46:52 +01:00

39 lines
772 B
JavaScript

var obj = null;
function checkHover() {
if (obj) {
obj.find('ul').fadeOut('fast');
} //if
} //checkHover
$(document).ready(function() {
$('#Nav > li').click(function() {
if (obj) {
obj.find('ul').fadeOut('fast');
obj = null;
} //if
$(this).find('ul').fadeIn('fast');
$(this).hover(function(){},function() {
obj = $(this);
setTimeout(
"checkHover()",
0); // si vous souhaitez retarder la disparition, c'est ici
})
});
$('#Nav2 > li').click(function() {
if (obj) {
obj.find('ul').fadeOut('fast');
obj = null;
} //if
$(this).find('ul').fadeIn('fast');
$(this).hover(function(){},function() {
obj = $(this);
setTimeout(
"checkHover()",
0); // si vous souhaitez retarder la disparition, c'est ici
})
});
});