From 954fcf034238458f292c9f5ec72c6d4b101aac0d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 7 Dec 2008 19:45:46 +0000 Subject: Merge gallery3/branches/menus back into gallery3/trunk --- core/js/menu.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 core/js/menu.js (limited to 'core/js') diff --git a/core/js/menu.js b/core/js/menu.js new file mode 100644 index 00000000..b5f0a6ee --- /dev/null +++ b/core/js/menu.js @@ -0,0 +1,24 @@ +$("document").ready(function() { + $("#gSiteMenu ul:not(:first)").css("display", "none"); + $("#gSiteMenu li").mouseover(function (ev) { + $(this).children("ul").css("display", "block"); + $(this).children("ul").find("li").css("clear", "both"); + + this.dropdown_open = true; + }); + $("#gSiteMenu li").mouseout(function (ev) { + $(this).children("ul").css("display", "none"); + this.dropdown_open = false; + }); + + $("#gSiteMenu li a").click(function () { + var href = $(this).attr("href"); + if (href == "#") { + return false; + } else if (href.match("^#") == "#") { + alert("Display href: " + href.substring(1) + "in a popup"); + return false; + } + return true; + }); +}); -- cgit v1.2.3