DEMO : http://jsfiddle.net/enve/hjeBP/
이 당신의 jQuery를 코드를 바꿉니다 :
<script type="text/javascript">
$(function(){ // document ready
if (!!$('#sidebar-left-content').length) { // make sure "#sidebar-left-content" element exists
var el = $('#sidebar-left-wrap');
var stickyTop = $('#sidebar-left-content').offset().top; // returns number
var footerTop = $('#footer').offset().top; // returns number
var stickyHeight = $('#sidebar-left-content').height();
var limit = footerTop - stickyHeight - 20;
$(window).scroll(function(){ // scroll event
var windowTop = $(window).scrollTop(); // returns number
if (stickyTop < windowTop){
el.css({ position: 'fixed', top: 0 });
}
else {
el.css('position','static');
}
if (limit < windowTop) {
var diff = limit - windowTop;
el.css({top: diff});
}
});
}
});</script>
작업 데모 : http://jsfiddle.net/enve/hjeBP/