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

Line 1,436: Line 1,436:
 
}
 
}
 
});
 
});
 +
</script>
 +
<script type="text/javascript">
 +
$(window).scroll(function(e) {
 +
  var $element = $('.scrollbox');
 +
  var headerHeight = $('#head').outerHeight();
 +
  var isFixed = ($element.css('position') == 'fixed');
 +
 +
  if ($(this).scrollTop() > headerHeight && !isFixed) {
 +
    $element.addClass("scrolled");
 +
  }
 +
  if ($(this).scrollTop() < headerHeight && isFixed) {
 +
    $element.removeClass("scrolled");
 +
  }
 +
});
 +
 +
function scrollToTop() {
 +
  $('body,html').animate({
 +
    scrollTop: 0
 +
  }, 400);
 +
}
 
</script>
 
</script>
 
<style>@import 'https://fonts.googleapis.com/css?family=Love+Ya+Like+A+Sister';</style>
 
<style>@import 'https://fonts.googleapis.com/css?family=Love+Ya+Like+A+Sister';</style>
 
</head>
 
</head>
 
</html>
 
</html>

Revision as of 14:50, 5 October 2016