Difference between revisions of "Template:Freiburg/wiki content start"
Line 15: | Line 15: | ||
console.log($(this).scrollTop()+' pageheight:'+$pageheight); | console.log($(this).scrollTop()+' pageheight:'+$pageheight); | ||
var y = $(this).scrollTop(); | var y = $(this).scrollTop(); | ||
+ | |||
+ | $blob.css({"top": y + $window.height() -100}); | ||
// button disappears on top of the page // | // button disappears on top of the page // | ||
if (y < 60) { | if (y < 60) { | ||
− | + | console.log('lower'); | |
− | + | $blob.css({"transform": "translateX(0)"}); // = 100 px outside | |
− | + | } | |
// button appears in the middle // | // button appears in the middle // | ||
if (y > 60 ) { | if (y > 60 ) { | ||
− | + | console.log('middle'); | |
− | + | $blob.css({"transform": "translateX(-130px)"}); // = 30 px inside right | |
− | + | ||
− | + | ||
} | } | ||
/* | /* |
Revision as of 06:42, 8 September 2015