0
在我們的工作區中,有一個使用YUI庫創建的上下文菜單。我們希望在用戶懸停在每個項目上時觸發工具提示。我搜索了一下,但找不到有用的信息。我們怎樣才能做到這一點?如何在鼠標指針位於YUI上下文菜單項上時顯示工具提示
這裏是如何的上下文菜單中創建:
// Add ContextMenu instance to the DataTable parent container
var contextMenu = new YAHOO.widget.ContextMenu("contextMenu", {trigger: viewScriptsDataTable.getTbodyEl(), itemData: contextMenuItems, lazyload: true});
contextMenu.render("viewScriptsGrid");
// Subscribe to events in format event, function, object to pass to function
contextMenu.beforeShowEvent.subscribe(CodesGrid.updateSelectionIfNecessary, viewScriptsDataTable);
contextMenu.subscribe("click", CodesGrid.onContextMenuClick, viewScriptsDataTable);