Без jquery:
script.js
window.addEventListener('load', function () {
var container = document.querySelector('.parallax');
var layers = container.querySelectorAll('.parallax__layer');
var speeds = [];
for (var i = 0; i < layers.length; i++) {
speeds[i] = layers[i].getAttribute('data-speed') / -100;
}
window.addEventListener('scroll', function () {
var y = this.pageYOffset;
for (var i = 0; i < layers.length; i++) {
layers[i].style.top = y * speeds[i] + 'px';
}
});
container.className += ' visible';
});
style.css
.parallax {
visibility: hidden;
}
.visible {
visibility: visible;
}