$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.element').addClass('active');
} else {
$('.element').removeClass('active');
}
});
Change element class or ID on lines 3 and 5 to trigger right elements and on line 2 100 is how many pixels to scroll until class is added.