Difference between revisions of "Template:Freiburg/wiki content start"

Line 1: Line 1:
 
<html>
 
<html>
 +
 +
<script>
 +
 +
$(document).ready(function(){
 +
var $blob  = $("#upwards_blob"),
 +
        $window    = $(window),
 +
        $pageheight = $(document).height()-$window.height()
 +
 +
    console.log('pageheight:'+$pageheight);
 +
 +
    $(window).scroll(function() {
 +
  console.log($window.scrollTop()+'  pageheight:'+$pageheight);
 +
 +
  if ($window.scrollTop() < 0.05*$pageheight) {
 +
console.log('lower');
 +
$blob.css({"transform":"translateX(0)"});
 +
}
 +
 +
  if ($window.scrollTop() > 0.05*$pageheight) {
 +
  if ($window.scrollTop() < 0.9*$pageheight) {
 +
  console.log('middle');
 +
  $blob.css({"transform":"translateX(-150px)"});
 +
  }
 +
  }
 +
 +
  if ($window.scrollTop() > 0.9*$pageheight) {
 +
  console.log('greater');
 +
  $blob.css({"transform":"translateX(0)"});
 +
  }
 +
 +
});
 +
});
 +
 +
</script>
  
 
<div class="content_background_wrapper">
 
<div class="content_background_wrapper">

Revision as of 17:42, 6 September 2015