M
M
Michael R.2018-05-03 13:43:35
JavaScript
Michael R., 2018-05-03 13:43:35

How to properly show and hide an element (Animate.css)?

I study Animate.css , I managed to implement most of the animation ideas, but there was a problem with the following task:

- By default, the child is hidden, when hovering over the parent, the child is assigned the animation class and the opened class (cancels the 'hidden' mode).
- The name of the animation class is taken from the data of the child itself.

Question: how to correctly implement the appearance and hiding of a child when the parent hover using Animate.css ? I would like to clearly see how people with experience write the entire logic of the script...

UPD: For example, I didn't manage to hide the child back at the end...

Code on CodePen.io

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TerNik, 2018-05-03
@Mike_Ro

.addClass('opened')- and then you do not remove the class, so the descendant is not hidden.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question