[jQuery] Re: Loop through array with animating each element

2009-01-25 Thread realin
Wo.. awesome !! Thanks a ton !! On Jan 25, 11:38 am, Ricardo Tomasi wrote: > Use setInterval instead: > > $(document).ready(function(){ >      var words = ['one', 'two', 'three', 'four', 'five'], >      tweet = $('#tweet'), i = -1; >      var slideshow = setInterval(function(){ >        var

[jQuery] Re: Loop through array with animating each element

2009-01-24 Thread Ricardo Tomasi
Use setInterval instead: $(document).ready(function(){ var words = ['one', 'two', 'three', 'four', 'five'], tweet = $('#tweet'), i = -1; var slideshow = setInterval(function(){ var val = words[++i] || words[i=0]; tweet.slideUp(function(){ $(this).text( val

[jQuery] Re: Loop through array with animating each element

2009-01-24 Thread realin
Awesome!! Works for me, but is there any way to make it continous slideshow. I mean right now it stops at five, i want to restart when it reaches five. Like looping slideshow.. Thanks a ton !! On Jan 24, 5:38 pm, realin wrote: > Hi Guys, > > Is there a way toloopthroughan array while i insert t

[jQuery] Re: Loop through array with animating each element

2009-01-24 Thread Ricardo Tomasi
All you need to do is increase the time for each value: $(document).ready(function(){ var words = ['one', 'two', 'three', 'four', 'five']; $.each(words,function(index,val){ setTimeout(function(){ $('#tweet').slideUp(function(){ $(this).text( val ).s