-6
我正在使用mVc 3視圖,當我將鼠標移到div上時彈出來,所以有很多div's 當我將鼠標懸停在其他具有不同值的彈出窗口上時功能正常工作我只是想在沒有調用其他功能的情況下在鼠標上添加延遲1秒處理Javascript dealy 1秒
//Display a named menu, at the position of another object
function display_menu(parent, named) {
//get the named menu
var menu_element = document.getElementById(named);
//override the 'display:none;' style attribute
menu_element.style.display = "";
//get the placement of the element that invoked the menu...
var placement = findPos(parent);
//...and put the menu there
menu_element.style.left = placement[0] + "px";
menu_element.style.top = placement[1] + "px";
}
//Hide a named menu
function hide_menu(named) {
//get the named menu
var menu_element = document.getElementById(named);
//hide it with a style attribute
menu_element.style.display = "none";
}
代碼轉儲並不嘗試隔離問題。 – leppie 2012-02-28 05:57:26