0
Look at this page:
https://www.nubank.com.br/gerando-boletos/
It has the following structure:
<p>titulo do post</p>
<img src>
<p>titulo do post</p>
<img src>
<p>titulo do post</p>
<img src>
But what I’m wondering is how to make the effect of appearing gradually that occurs in the images ONLY when we scroll the page and then get into the image.
I must search for what?
According to a colleague’s reply below, I tried it the way below and it did not work.
The picture only appears. I confirmed the lnkagem of the files
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="jquery.lazyload.js"></script>
<p>Titulo.</p>
<img class="lazy" src="payment_swipe.png">
<script>
$(function() {
$("img.lazy").lazyload({
effect : "fadeIn"
})
});
</script>
The attribute
src
you replaced bydata-original
in the image.– Kenny Rafael
<img class="Lazy" date-original="payment_swipe.png">, the image appeared normally but the effect did not occur
– Carlos Rocha
I think I got it, I took the latest versions of Jquery and Plugin and it worked. Only fadein is happening too fast. There’s a way to slow it down?
– Carlos Rocha
just add
effectspeed: 900
in the method parameters...– Kenny Rafael
And then it worked?
– Kenny Rafael
yes, it did. Thank you. I also found Scrollreveal which is also very good. Then look there. https://scrollrevealjs.org/
– Carlos Rocha