bux23
1/16/2017 - 7:59 AM

Fade in rows

Fadi in rows

// FADE IN ROWS
$(document).ready(function() {
    
    $(window).scroll( function(){
    
        $('.hidden-row').each( function(i){
            
            var top_of_object = $(this).offset().top + 50;
            var bottom_of_window = $(window).scrollTop() + $(window).height();
            var original_margin = $(this).css('margin-top');
            
            if( bottom_of_window > top_of_object ){
                $(this).css({"transform":"translate(0,0)", "opacity":"1"});
            }
        }); 
    });
    $(window).scroll();
});