好的,我有这个代码:
<html>
<head>
var timeout = 0;
var closetimer = 0;
var ddmenuitem = 0;
function jsddm_open()
{ jsddm_canceltimer();
jsddm_close();
ddmenuitem = $(this).find('#as').eq(0).css('visibility', 'visible');
bb = $(this).css("background","#0099FF");
}
function jsddm_close()
{
if(ddmenuitem)
ddmenuitem.css('visibility', 'hidden');
}
function jsddm_timer()
{ closetimer = window.setTimeout(jsddm_close, timeout);
bb = $(this).css("background","none");
}
function jsddm_canceltimer()
{ if(closetimer)
{ window.clearTimeout(closetimer);
closetimer = null;}}
$(document).ready(function()
{
$("#sinputbox").watermark("Search item here...");
$('#menu > li').bind('mouseover', jsddm_open);
$('#menu > li').bind('mouseout', jsddm_timer);});
document.onclick = jsddm_close;
</head>
<body>
<div id="hmenu">
<ul id="menu">
<li><a class="active" href="index.php">Home</a></li>
<li><a href="gallery.php?name=gallery">Gallery</a>
<ul id="as">
<li><a href="gallery.php?name=clothing">Clothing</a></li>
<li><a href="gallery.php?name=furniture">Furniture</a></li>
<li><a href="gallery.php?name=householditems">Household-items</a></li>
<li><a href="gallery.php?name=automotive">Automotive</a> </li>
<li><a href="gallery.php?name=food">Food</a></li>
</ul>
</li>
<li><a href="about.php">About</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
</body>
</html>
现在,我打算在该下拉菜单中添加一个下拉菜单,但我不知道如何。我试图$('this').slideDown('slow');
在这个函数中添加这一行:“”:“ function jsddm_timer()
”但到目前为止没有任何效果。有人可以帮我解决这个问题吗?我对任何建议都持开放态度,谢谢。