X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52e5fa6ad78f375cec5a207a123a4aa3939c8ddf..85d17f257c338f668a1d17d9fc62a2f48ec84230:/app/assets/javascripts/menu.js?ds=sidebyside diff --git a/app/assets/javascripts/menu.js b/app/assets/javascripts/menu.js index 8db1be4b9..e829f2aa6 100644 --- a/app/assets/javascripts/menu.js +++ b/app/assets/javascripts/menu.js @@ -35,7 +35,7 @@ function enterMenuAnchor(event, anchor, menu, delay, align) { 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); } @@ -48,7 +48,7 @@ function enterMenuAnchor(event, anchor, menu, delay, 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(); } @@ -61,7 +61,7 @@ function leaveMenuAnchor(event, anchor, menu) { 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(); } @@ -75,9 +75,9 @@ function createMenu(anchorid, menuid, delay, align) { 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); }); }