X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/13289d404188bd397ee72852f66c415a2bb87066..02542c96f27787a17da677bd9fc0e3ef8bceeaf6:/app/assets/javascripts/menu.js 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); }); }