aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/subsilver2/template/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/styles/subsilver2/template/common.js')
-rw-r--r--phpBB/styles/subsilver2/template/common.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/styles/subsilver2/template/common.js b/phpBB/styles/subsilver2/template/common.js
new file mode 100644
index 0000000000..c9e6221e2e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/common.js
@@ -0,0 +1,18 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+// Toggle notification list
+$('#notification_list_button').click(function(e) {
+ $('#notification_list').toggle();
+ e.preventDefault();
+});
+$(document).click(function(e) {
+ var target = e.target;
+
+ if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
+ $('#notification_list').hide();
+ }
+});
+
+})(jQuery); // Avoid conflicts with other libraries