clearTimeout(menu.timer);
if (delay > 0) {
- menu.timer = setTimeout(function () { openMenu(anchor, menu, align) }, delay);
+ menu.timer = setTimeout(function () { openMenu(anchor, menu, align); }, delay);
} else {
openMenu(event, menu, align);
}
function leaveMenuAnchor(event, anchor, menu) {
var to = event.relatedTarget;
- if (!menu.is(to) && menu.has(to).length == 0) {
+ if (!menu.is(to) && menu.has(to).length === 0) {
menu.hide();
}
function leaveMenu(event, anchor, menu) {
var to = event.relatedTarget;
- if (!anchor.is(to) && menu.has(to).length == 0) {
+ if (!anchor.is(to) && menu.has(to).length === 0) {
menu.hide();
}
var anchor = $("#" + anchorid);
var menu = $("#" + menuid);
- anchor.mouseup(function (event) { closeMenu(menu) });
- anchor.mouseover(function (event) { enterMenuAnchor(anchor, anchor, menu, delay, align) });
- anchor.mouseout(function (event) { leaveMenuAnchor(event, anchor, menu) });
- menu.mouseup(function (event) { closeMenu(menu) });
- menu.mouseout(function (event) { leaveMenu(event, anchor, menu) });
+ anchor.mouseup(function (event) { closeMenu(menu); });
+ anchor.mouseover(function (event) { enterMenuAnchor(anchor, anchor, menu, delay, align); });
+ anchor.mouseout(function (event) { leaveMenuAnchor(event, anchor, menu); });
+ menu.mouseup(function (event) { closeMenu(menu); });
+ menu.mouseout(function (event) { leaveMenu(event, anchor, menu); });
}