aboutsummaryrefslogtreecommitdiffstats
path: root/doc/phpdoc/js/menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'doc/phpdoc/js/menu.js')
-rw-r--r--doc/phpdoc/js/menu.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/phpdoc/js/menu.js b/doc/phpdoc/js/menu.js
new file mode 100644
index 0000000..e94e531
--- /dev/null
+++ b/doc/phpdoc/js/menu.js
@@ -0,0 +1,31 @@
+var timeout = 500;
+var closetimer = 0;
+var ddmenuitem = 0;
+
+function menu_open() {
+ menu_canceltimer();
+ menu_close();
+ ddmenuitem = $(this).find('ul').css('visibility', 'visible');
+}
+
+function menu_close() {
+ if (ddmenuitem) ddmenuitem.css('visibility', 'hidden');
+}
+
+function menu_timer() {
+ closetimer = window.setTimeout(menu_close, timeout);
+}
+
+function menu_canceltimer() {
+ if (closetimer) {
+ window.clearTimeout(closetimer);
+ closetimer = null;
+ }
+}
+
+$(document).ready(function() {
+ $('#file-nav > li').bind('mouseover', menu_open);
+ $('#file-nav > li').bind('mouseout', menu_timer);
+});
+
+document.onclick = menu_close; \ No newline at end of file