jQuery-menu- aim 介绍
Amazon网站 分类 导航的下拉 菜单 被使用得非常频繁,但你有没有注意过它的反应非常迅速?
menu- aim 是 一个 jQuery 下拉 菜单 插件 ,该 插件 能够甄别 用户 是尝试移动鼠标到下拉列表项还是将鼠标移至子 菜单 内容 上。
使用如下:
$("#menu").menu aim ({
activate: $.noop,// fired on row activation
deactivate: $.noop // fired on row deactivation
});
以下选项可以传递给menu aim 。所有 函数 都使用相关行的html元素作为执行上下文('this')执行:
.menu aim ({
// Function to call when a row is purposefully activated. Use this
// to show a submenu's content for the activated row.
activate: function() {},
// Function to call when a row is deactivated.
deactivate: function() {},
// Function to call when mouse enters a menu row. Entering a row
// does not mean the row has been activated,as the user may be
// mousing over to a submenu.
enter: function() {},
// Function to call when mouse exits a menu row.
exit: function() {},
// Function to call when mouse exits the entire menu. If this returns
// true,the current row's deactivation event and callback function
// will be fired. Otherwise,if this isn't supplied or it returns
// false,the currently activated row will stay activated when the
// mouse leaves the menu entirely.
exitMenu: function() {},
// Selector for identifying which elements in the menu are rows
// that can trigger the above events. Defaults to "> li".
rowSelector: "> li",
// You may have some menu rows that aren't submenus and therefore
// shouldn't ever need to "activate." If so,filter submenu rows w/
// this selector. Defaults to "*" (all elements).
submenuSelector: "*",
// Direction the submenu opens relative to the main menu. This
// controls which direction is "forgiving" as the user moves their
// cursor from the main menu into the submenu. Can be one of "right",
// "left","above",or "below". Defaults to "right".
submenuDirection: "right"
});
menu- aim 假设您使用的子 菜单 扩展到 菜单 右侧。当 用户 的鼠标进入新的下拉项目以及有意悬停该项目时,它将触发事件
GitHub: https://github.com/kamens/jQuery-menu-aim
网站描述: 一个 jQuery下拉 菜单 插件
jQuery-menu-aim官方网站
官方网站:
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。