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

(added active-display)
Line 1: Line 1:
 
<html>
 
<html>
 
<script>
 
<script>
 +
 +
 +
 
function toggleContent() {
 
function toggleContent() {
 
//textVar = "title_" + id
 
//textVar = "title_" + id
Line 26: Line 29:
 
     });
 
     });
 
});
 
});
 
 
  
 
$(window).on('load', function() {
 
$(window).on('load', function() {
 
hideNavbars();
 
hideNavbars();
 +
});
 +
 +
$(window).on('load', function() {
 +
$url = window.location.href.split("/");
 +
 +
 +
var i;
 +
for (i = 2; i < $url.length; ++i) {
 +
$str = "#" + $url[i].toLowerCase();
 +
$("#" + $str).addClass("navbar active");
 +
}
 
});
 
});
  
Line 121: Line 133:
 
     });
 
     });
 
});
 
});
 +
 +
 +
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 01:13, 27 August 2017