[jQuery] Re: take 3 values at time for fade in fade out effect.
What about index_news = index_news + 3 ?
hth
Rick
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On
Behalf Of deep
Sent: Monday, October 26, 2009 9:40 AM
To: jQuery (English)
Subject: [jQuery] Re: take 3 values at time for fade in fade out effect.
I have tried something like this
index_news +=3;
but its not working.
can anyone please help me how can i increase my index_new value by 3?
On Oct 26, 5:07 pm, deep <deeps...@gmail.com> wrote:
> Hello
>
> I have following code which i am using for fade in fade out effect.
> with this code at time only one image is coming. I want at time it
> should show 3 images. like 1,2,3 then 4,5,6
>
> Here is my code.
>
> var index_news = 0;
>
> //
>
> function initNews() {
>
> $('div#feed-ticker')
>
> .slideDown('slow',
>
> function() {
>
> $('div#feed-ticker li').eq( index_news ).fadeIn();
>
> setTimeout( next_news, 5000 );
>
> }
>
> );
>
> }
>
> function next_news() {
>
> $('div#feed-ticker li')
>
> .eq( index_news )
>
> .fadeOut(1000,
>
> function() {
>
> index_news++;
>
> if( index_news> $('div#feed-ticker li').length-1 )
> index_news = 0;
>
> $('div#feed-ticker li').eq( index_news ).fadeIn();
>
> setTimeout( next_news, 5000 );
>
> }
>
> );
>
> }
>
> Can anyone tell me how can i set the value here. May be because of
> this index_news++; its taking one value at time. but how can i
> increase it by 3?
>
> Thanks in advance.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home