誰かがこの単純なコードで私を助けてくれますか..私はまだjsの初心者で、何が間違っているのかわかりません。基本的に私はマウスオーバーメニューを作ろうとしています。
function showQuickLinks() {
//show the menu
}
function hideQuickLinks() {
//hides the menu
}
//button mouseover
$("#quick-links-dd").mouseover(function() {
showQuickLinks();
});
var mnuTimeout;
//clears timeout when it rolls over the button
$("#quick-links-dd").mouseover(function () {
clearTimeout(mnuTimeout);
})
//$("#quick-links) - quick links container
//hides the menu when the mouse is not over the container
$("#quick-links").mouseout(function () {
mnuTimeout = setTimeout("hideQuickLinks()",1000);
});
マウスオーバーは機能しますが、マウスがリンクコンテナの外にある場合、コードは実行されません。