Difference between revisions of "Template:Freiburg/wiki content start"
Line 7: | Line 7: | ||
$window = $(window), | $window = $(window), | ||
$pageheight = $(document).height()-$window.height(), | $pageheight = $(document).height()-$window.height(), | ||
− | |||
topPadding = 15; | topPadding = 15; | ||
Line 30: | Line 29: | ||
if ($window.width() < 1320) { | if ($window.width() < 1320) { | ||
if ($window.scrollTop() > ($pageheight-100)) { | if ($window.scrollTop() > ($pageheight-100)) { | ||
− | console.log('greater'); | + | console.log('greater small'); |
$blob.css({"transform":"translate(-150px, -100px)"}); | $blob.css({"transform":"translate(-150px, -100px)"}); | ||
} | } | ||
Line 37: | Line 36: | ||
else { | else { | ||
if ($window.scrollTop() > ($pageheight-430)) { | if ($window.scrollTop() > ($pageheight-430)) { | ||
− | console.log('greater'); | + | console.log('greater wide'); |
$blob.css({"transform":"translate(-150px, 0)"}); | $blob.css({"transform":"translate(-150px, 0)"}); | ||
+ | console.log('offset: 'offset.top); | ||
if ($window.scrollTop() > offset.top) { | if ($window.scrollTop() > offset.top) { | ||
$blob.stop().animate({ | $blob.stop().animate({ | ||
− | + | bottom: $pageheight - $window.scrollTop() + topPadding | |
}); | }); | ||
} | } | ||
else { | else { | ||
$blob.stop().animate({ | $blob.stop().animate({ | ||
− | + | bottom: 3% | |
}); | }); | ||
} | } |
Revision as of 20:50, 6 September 2015