Difference between revisions of "Template:Team:Bielefeld-CeBiTec/JS"

(added active-display)
m (work on active-display)
Line 37: Line 37:
 
$url = window.location.href.split("/");
 
$url = window.location.href.split("/");
 
 
 +
var dict = {
 +
"hardware" : "project"
 +
}
 
 
 
 
 
var i;
 
var i;
 
for (i = 2; i < $url.length; ++i) {
 
for (i = 2; i < $url.length; ++i) {
$str = "#" + $url[i].toLowerCase();
+
$str = $url[i].toLowerCase();
 +
$str = dict[$str];
 
$("#" + $str).addClass("navbar active");
 
$("#" + $str).addClass("navbar active");
 
}
 
}

Revision as of 01:30, 27 August 2017