I'm trying to achieve a similar effect like the one shown in this website (you need to scroll down a bit to see the divs sliding in).
Although I'm not very proficient in JS, I was able to create a code that makes the divs fade in from 0 opacity to full opacity:
tiles = $(".recipe").fadeTo(0, 0);
$(window).scroll(function(d,h) {
tiles.each(function(i) {
a = $(this).offset().top + $(this).height();
b = $(window).scrollTop() + $(window).height();
if (a < b) $(this).fadeTo(500,1);
});
});
Does anyone have suggestions on how I can achieve the desired effect? I want the divs to smoothly slide up from 0 opacity to 100% opaque when scrolling from bottom to top.
Hopefully this all makes sense. Thank you!