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

Line 144: Line 144:
  
 
<script>
 
<script>
var distance = $('.title img').outerHeight(),
+
$(document).ready(function() {
 +
var distance = $('.title').innerHeight(),
 
     $window = $(window);
 
     $window = $(window);
console.log($('.title'));
+
console.log(distance);
  
 
$window.scroll(function() {
 
$window.scroll(function() {
Line 153: Line 154:
 
console.log('on top');
 
console.log('on top');
 
     }
 
     }
 +
});
 
});
 
});
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 09:44, 13 October 2016