<script type="text/javascript">
$(document).ready(function(){
window.setInterval(function(){
$('.layer6').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', 'right '+$.scroolly.getTransitionFloatValue(110, 105, progress)+'%');
element.css('background-size', $.scroolly.getTransitionFloatValue(18, 23, progress)+'%');
}
},
]);
$('.layer0').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', 'right '+$.scroolly.getTransitionFloatValue(90, 110, progress)+'%');
element.css('background-size', $.scroolly.getTransitionFloatValue(100, 110, progress)+'%');
}
},
]);
$('.layer1').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', '91% '+$.scroolly.getTransitionFloatValue(110, 90, progress)+'%');
element.css('background-size', $.scroolly.getTransitionFloatValue(18, 23, progress)+'%');
}
},
]);
$('.layer2').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', '110% '+$.scroolly.getTransitionFloatValue(-60, -80, progress)+'%');
element.css('background-size', $.scroolly.getTransitionFloatValue(30, 40, progress)+'%');
}
},
]);
$('.layer4').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', '115% '+$.scroolly.getTransitionFloatValue(110, 80, progress)+'%');
element.css('background-size', $.scroolly.getTransitionFloatValue(30, 37, progress)+'%');
}
},
]);
$('.layer5').scroolly([
{
onScroll: function(element, offset, length){
var progress = offset / length;
element.css('background-position', '-5% '+$.scroolly.getTransitionFloatValue(65, 75, progress)+'%')
element.css('background-size', $.scroolly.getTransitionFloatValue(40, 50, progress)+'%');
}
},
]);
}, 4000);
});
</script> |