How can I make it so that when my right div gets to the comment area div it gets fixed again? When it arrives at an X number of distance from the top I apply a position fixed for it to follow the content: Link of the stuff
<script type="text/javascript">
$(document).ready(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 630) {
$('.paginas-especiais-post').css({
position: 'fixed',
top: '60px'
});
} else {
$('.paginas-especiais-post').css({
position: 'relative',
top: '0'
});
}
});
});
</script>