Difference between revisions of "Template:Team:TU Darmstadt/MainMenu"

Line 115: Line 115:
 
<script>
 
<script>
 
$(document).ready(function() {
 
$(document).ready(function() {
console.log( "ready!" );
 
 
   $('.mobile-toggle').on('click', function(evt) {
 
   $('.mobile-toggle').on('click', function(evt) {
 
     evt.preventDefault();
 
     evt.preventDefault();
  console.log('mobile-toggle');
 
 
     if ($('.navbar').hasClass('open-nav')) {
 
     if ($('.navbar').hasClass('open-nav')) {
 
         $('.navbar').removeClass('open-nav');
 
         $('.navbar').removeClass('open-nav');
Line 140: Line 138:
 
     if ($(this).prop('href') == window.location.href) {
 
     if ($(this).prop('href') == window.location.href) {
 
       $(this).addClass('current');
 
       $(this).addClass('current');
console.log(this);
 
console.log(window.location.href);
 
 
     }
 
     }
 
   });
 
   });

Revision as of 13:36, 13 October 2016