forxtu
9/11/2017 - 12:26 PM

Parallax jQuery

Parallax with zoom and opacity jQuery

/* Parallax */
$(window).scroll(function(){
  var x = $(this).scrollTop(),
  transY = (x * 0.4), scale = 1 + (x * 0.0003),
  transform = 'translateY('+transY+'px) scale('+scale+') translate3d(0,0,0)';
  $('#main__slider .main__slider-wrap').css({
    opacity: 1 - (x * 0.0008),
    WebkitTransform: transform,
    MozTransform: transform,
    msTransform: transform,
    transform: transform
});
});