Home » Javascript » i need a good formule for my fading image based on scroll

i need a good formule for my fading image based on scroll

Posted by: admin August 19, 2018 Leave a comment

Questions:

currently i’m using the following formule:

var scrollTop = $(this).scrollTop();
$('.item').css({opacity: 100 / scrollTop});

but if you watch on the home page of my website, its stops fading at one moment,
does somebody know a better formule?

My website

Answers: