我已经使用过这个脚本执行类似的功能。
var menu = {I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?;
menu.laatstGeopend = null;
menu.timeoutTime = 1000;
menu.timeout = null;
menu.init = function()
{
$("#menu>li").hover(
function()
{
// als laatstegeopend dezelfde is als de huidige, dan de timeout verwijderen
if($(this).hasClass("hover"))
{
clearTimeout(menu.timeout);
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?
// nieuwe uitschuiven
else
{
$("#menu>li>ul").hide();
$("#menu>li").not(this).removeClass("hover").removeClass("uitklappen_hover");
$(this).addClass("hover");
if($(this).hasClass("uitklappen"))
{
$(this).addClass("uitklappen_hover");
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?
$(">ul", this).hide().slideDown(300);
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?
// selectbox in
clearTimeout(menu.timeout);
menu.timeout = setTimeout(function()
{
$(menu.laatstGeopend).removeClass("hover uitklappen_hover");
// selectbox in <ie7 tonen
if($.browser.msie && $.browser.version < 7) {
$("select").css({ visibility: visible I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?);
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?, menu.timeoutTime);
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?
);
I'm sorry, but you haven't provided any text for me to translate into Chinese. Could you please give me something to work with?