aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/submenu_js.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-08 03:42:23 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-08 03:42:23 +0000
commitaa011b14603ba807121c811399685895a9c75d67 (patch)
tree26a2916749929b34f5295fa55ee4c7d62126e17d /views/default/navigation/submenu_js.php
parent7682706a46a20e3e58a9afd8ba208d5b0c040499 (diff)
downloadelgg-aa011b14603ba807121c811399685895a9c75d67.tar.gz
elgg-aa011b14603ba807121c811399685895a9c75d67.tar.bz2
Added new submenu system.
Added elgg_http_url_is_identical(). Moved canvas_header/submenu* to navigation/submenu*. Added UI test for submenu. git-svn-id: http://code.elgg.org/elgg/trunk@5982 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/submenu_js.php')
-rw-r--r--views/default/navigation/submenu_js.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/views/default/navigation/submenu_js.php b/views/default/navigation/submenu_js.php
new file mode 100644
index 000000000..0f0c88888
--- /dev/null
+++ b/views/default/navigation/submenu_js.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Javascript to expand submenu items.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+?>
+
+<script type="text/javascript">
+$(document).ready(function() {
+ $('.submenu span.child_indicator').click(function() {
+ var submenu = $(this).parent().parent().find('ul.submenu.child:first');
+ var closeChild = $($(this).find('.close_child'));
+ var openChild = $($(this).find('.open_child'));
+
+ if (submenu.is(':visible')) {
+ closeChild.addClass('hidden');
+ openChild.removeClass('hidden');
+ } else {
+ closeChild.removeClass('hidden');
+ openChild.addClass('hidden');
+ }
+
+ submenu.slideToggle();
+ return false;
+ });
+});
+</script> \ No newline at end of file