summaryrefslogtreecommitdiffstats
path: root/web/js/labitrack.d/20-topbar.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/labitrack.d/20-topbar.js')
-rw-r--r--web/js/labitrack.d/20-topbar.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/js/labitrack.d/20-topbar.js b/web/js/labitrack.d/20-topbar.js
new file mode 100644
index 0000000..fdebd6d
--- /dev/null
+++ b/web/js/labitrack.d/20-topbar.js
@@ -0,0 +1,13 @@
+(function(){
+ λ.topbar = topbar = {};
+ topbar.update = function(){
+ console.log('topbar update');
+ $('ul.nav li a').each(function(){
+ if (this.href === window.location.href) {
+ $(this).parent().addClass('active');
+ } else {
+ $(this).parent().removeClass('active');
+ }
+ });
+ };
+}());