Difference between revisions of "Template:Freiburg/wiki content start"
Line 14: | Line 14: | ||
$(window).scroll(function(event) { | $(window).scroll(function(event) { | ||
console.log($(this).scrollTop()+' pageheight:'+$pageheight); | console.log($(this).scrollTop()+' pageheight:'+$pageheight); | ||
− | var y = $(this).scrollTop() | + | var y = $(this).scrollTop(), |
− | + | top = $(this).scrollTop() + $window.height() -100}; | |
− | + | ||
// button disappears on top of the page // | // button disappears on top of the page // | ||
Line 29: | Line 28: | ||
$blob.css({"transform": "translateX(-130px)"}); // = 30 px inside right | $blob.css({"transform": "translateX(-130px)"}); // = 30 px inside right | ||
} | } | ||
+ | |||
+ | // blob stays 100px above bottom | ||
+ | $blob.css({"top": top ); | ||
+ | |||
+ | // if there is no lower background image, the button just moves upwards so it doesnt touch the footer | ||
+ | if ($window.width() < 1320) { | ||
+ | if (y > ($pageheight - $window.height() - 100)) { | ||
+ | console.log('greater small'); | ||
+ | $blob.css({"top": top ); | ||
+ | } | ||
+ | } | ||
+ | |||
/* | /* | ||
// if there is no lower background image, the button just moves upwards so it doesnt touch the footer // | // if there is no lower background image, the button just moves upwards so it doesnt touch the footer // |
Revision as of 07:02, 8 September 2015