$(function() {
var $sidebar = $( "#sidebar"),
$window = $(window),
오프셋 = $sidebar.offset(),
topPadding = 15;
$window.scroll(function() {
if ($window.scrollTop() > offset.top) {
$sidebar.stop().animate({
marginTop: $window.scrollTop() - offset.top topPadding
});
} else {
$sidebar.stop().animate({
marginTop: 0
});
}
});
});