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

Line 140: Line 140:
 
     }
 
     }
 
   });
 
   });
});
 
</script>
 
 
<script>
 
$(document).ready(function() {
 
var distance = $('.title').innerHeight(),
 
    $window = $(window);
 
console.log(distance);
 
 
$window.scroll(function() {
 
    if ( $window.scrollTop() >= distance ) {
 
        $('.navbar').addClass('top-fixed');
 
console.log('on top');
 
    }
 
});
 
 
});
 
});
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 09:46, 13 October 2016