summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorNicolas Kuttler <git@kuttler.eu>2015-02-12 15:46:10 +0100
committerNicolas Kuttler <git@kuttler.eu>2015-02-12 15:46:10 +0100
commit85cce67ca112b954cc49fe314f3028581bd7a727 (patch)
tree7752f7e3e28a456b5a8d08e9c0f23bc802adb4c2 /assets/js
parentdff1da3c2560c88d7aeaa0d1ea137d25705808b1 (diff)
downloadirssi.github.io-85cce67ca112b954cc49fe314f3028581bd7a727.zip
Remove jQuery and bootstrap js
We don't really need any of it (for now at least) as we only need to show/hide the mobile navigation.
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/irssi.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/js/irssi.js b/assets/js/irssi.js
new file mode 100644
index 0000000..b892254
--- /dev/null
+++ b/assets/js/irssi.js
@@ -0,0 +1,15 @@
+function initMenu() {
+ 'use strict';
+ var toggle = document.getElementById("navbar-toggle"),
+ menu = document.getElementById("navbar");
+ // IE9+
+ toggle.addEventListener('click', function () {
+ // IE10+
+ menu.classList.toggle("collapse");
+ });
+};
+
+// IE9+
+document.addEventListener("DOMContentLoaded", function(event) {
+ initMenu();
+});