...
'); fb.after(cd); fb.css({
'z-index': 999
}).data({
'top': fb.offset().top,
'left': fb.offset().left
}); $(window).scroll(function() {
var pt = fb.data('top');
var pl = fb.data('left'); var st = $(document).scrollTop() - 10;
var h = $(document).height();
if (st > pt || st == pt) { cd.show();
if ((st + self.outerHeight()) > h) { self.css({
position: 'fixed',
top: (h - (st + self.outerHeight()))
});
} else { self.css({
position: 'fixed',
top: 0 - mt
});
}
} else { cd.hide(); self.css({
position: 'relative',
top: 0
});
}
})
})
})