How to wait and fade an element out?
I have an alert box to confirm that the user has successfully subscribed:<div className="alert alert-success"><strong>Success!</strong> Thank you for subscribing!</div> When a...
View ArticleAnswer by rishat for How to wait and fade an element out?
May 2021 update: as tolga and Alexey Nikonov correctly noted in their answers, it’s possible to give away control over how long the alert is being shown (in the original question, 2 seconds) to the...
View ArticleAnswer by tolga for How to wait and fade an element out?
An other way is to solve this with a CSS3 transition. https://www.tutorialspoint.com/css/css_animation_fade_out.htmYou can add a new class to the alert (like .hidden) and then you can relate .hidden...
View ArticleAnswer by Alexey Nikonov for How to wait and fade an element out?
The correct way is to use Transition handler for Fade-in/outIn ReactJS there is synthetic event to wait till fade-out is finished: onTransitionEnd.NOTE there are different css effects associated with...
View Article