var postion = $('#4').offset().top,
height = $('#4').height();
$(document).on('scroll', function (){
var scroll = $(document).scrollTop();
if(scroll > postion && scroll < (postion + height) ) {
$('.line').addClass('line-color-black')
}else {
$('.line').removeClass('line-color-black')
}
})