About ContectMenu

I was using ContectMenu, when I right click the ContextMenu will show/pop up. But if I did not click on the CotextMenu, the CotextMenu will continue show there. How can I set a timer(eg 5 second) when ContextMenu show/pop up and no response within 5 second, the ContextMenu will auto close

The menu has two inner methods:



both located in dhtmlxMenu.js, lines 1270-1290. You can add custom code

which starts 3sec timer in _onItemOut and drop it in _onItemOver. In such

case timer will fire in 3sec after mouse was moved out from menu.

But I do not know how to do,could you help me to do an example? Thanks

Code below is not tested but must work

global code

    var timer=null;

In _onItemOut next code added


In _onItemOver
next code added

    if (timer) timer=window.clearTimeout(timer);