Difference between revisions of "Template:ETH Zurich"
m |
m |
||
Line 75: | Line 75: | ||
$window.scroll(function() { | $window.scroll(function() { | ||
if ($window.scrollTop() > offset.top) { | if ($window.scrollTop() > offset.top) { | ||
+ | if ($window.scrollTop() < offsetbot.top) { | ||
$sidebar.stop().animate({ | $sidebar.stop().animate({ | ||
marginTop: $window.scrollTop() - offset.top + topPadding | marginTop: $window.scrollTop() - offset.top + topPadding | ||
},duration=200); | },duration=200); | ||
+ | } else { | ||
+ | $sidebar.stop().animate({ | ||
+ | marginTop: 0 | ||
+ | }); | ||
+ | } | ||
} else { | } else { | ||
$sidebar.stop().animate({ | $sidebar.stop().animate({ |
Revision as of 11:23, 18 August 2015