+7 982 100 5 999

jQuery паралакс анимация

function parallaxScroll(){
    var scrolled = $(window).scrollTop();
    $('#parallax-bg1').css('top',(100-(scrolled*.3))+'px');
    $('#parallax-bg2').css('top',(700-(scrolled*1.5))+'px');
    $('#parallax-bg3').css('top',(300-(scrolled*0.2))+'px');
    $('#parallax-bg4').css('top',(1100-(scrolled*0.5))+'px');
    $('#parallax-bg5').css({
        transform: 'translate3d(0, -'+(scrolled/70)+'%, 0) scale('+(200 + scrolled/5)/100+')',
    });
}