X
X
XenK2015-05-15 21:27:39
JavaScript
XenK, 2015-05-15 21:27:39

Animation when a new element appears, how?

There is a list of 5 items:

Test1
Test2
Test3
Test4
Test5

This list is dynamically updated using AJAX , and as a result of the update, the list will be like this:
Test2
Test3
Test4
Test5
Test6

When a new element appears (Test6), the animation (fadeIn) of this element should occur. How can this be done with jQuery ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FMars, 2015-05-15
@XenK

I would implement with CSS, not JS.
I recommend using a ready-made set of animations: Animate.css . Just include the downloaded css file and add the "animated" class and animation type to the element that should appear, for example:
<span class="animated fadeIn">Test 6</span>

D
Denis Ineshin, 2015-05-15
@IonDen

For example: jsfiddle.net/IonDen/fot7h3ka
Only animation is better done with CSS today.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question