2
I’m trying to show the elements in sequence:
<p class="desc">1)INFORMACAO1?</p>
<p class="desc">2) INFORMACAO2</p>
<p class="desc">3)INFORMACAO3</p>
<p class="desc">4) INFORMACAO4</p>
<p class="desc">5) INFORMACAO5</p>
I’m not making it with this line of code:
$(this).next('.desc').fadeIn('slow');
That’s how it works, but it shows everyone:
$('.desc').fadeIn('slow');
It is also a method of doing... but the intervals are not fixed.. in this case will be of
0,500,1000,1500,2000
. But look...I respected you just for your "nick"... best band on the planet.+1
– Marllon Nasser
@Marllonnasser are actually fixed. The interval between the animations will always be
interval / 2
. In the example the interval will always be 500 milliseconds. I know that the space is not for off-topic, but I have to agree. There’s gonna be a better band than this. ,,/– rdleal
The "i" is incremented, right? So in the first interaction is
0*(1000/2)=0
. In the second interaction is1*(1000/2)=500
. In the third2*(1000/2)=1000
. And so on... but it’s a solution too! As you said there is nothing in the question requesting that the interval be fixed... so I gave+1
. \m/– Marllon Nasser
@Marllonnasser worth noting here is that the
delay
does not delay the execution ofeach
. This means that delays are practically concurrent, so we can predict the interval between the beginning of one animation to the beginning of another with:intervalo atual - intervalo anterior
. Just when the second animation starts you will have passed500 - 0
milliseconds from the beginning of the first. From the third animation to the second:1000 - 500
. Fourth to Third:1500 - 1000
... this also applies in your reply, which has the fixed interval of1000
, since thesetTimeout
does not delay the execution ofeach
.– rdleal