Difference between revisions of "Template:ETH Zurich"
m |
m |
||
Line 66: | Line 66: | ||
$window = $(window), | $window = $(window), | ||
offset = $sidebar.offset(), | offset = $sidebar.offset(), | ||
+ | offset_bot = $("#footerContainer").offset(); | ||
topPadding = 50; | topPadding = 50; | ||
$window.scroll(function() { | $window.scroll(function() { | ||
− | if (($window.scrollTop() > offset.top) && ($window.scrollTop() < $ | + | if (($window.scrollTop() > offset.top) && ($window.scrollTop() < $offset_bot.top)) { |
$sidebar.stop().animate({ | $sidebar.stop().animate({ | ||
marginTop: $window.scrollTop() - offset.top + topPadding | marginTop: $window.scrollTop() - offset.top + topPadding |
Revision as of 11:15, 18 August 2015