Skip to content
Advertisement

How to fade In/Out text + images

I’m trying to create a reviews area within my website, to display some clients reviews I gathered + their logo. For now, I’ve managed to change both (review+logo) every 5 seconds :)! it works!

What I’m trying to achieve now is to fade/out and fade/in the next review + logo. I’m not sure where should I search about it, can someone point me towards the right post or article? thanks

JavaScript
JavaScript
JavaScript

Advertisement

Answer

jQuery includes stuff for fading: https://api.jquery.com/category/effects/fading/

It takes a callback function that’s called once the animation is finished. You can use this to fade in the next review after the previous one is finished fading out.

JavaScript

And then you can still use your setInterval call to know how often to run this.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement