JavaScript slideshow not smoothly transitioning

I'm trying to build a JavaScript slideshow using jQuery, but am not getting very far.  Right now, the image fades out, but the next images in the array start flickering in while the whole thing continues to fade in and out.  Any thoughts?
function slideImages1() {
	var slideShow1 = new Array('slide1_1.jpg', 'slide1_2.jpg', 'slide1_3.jpg', 'slide1_4.jpg');
	var s=0;
	function slowDown() {
		$("#slide1").fadeOut(2000).;
		$("#slide1").html("<img src='images/slide/"+slideShow1[s]+"' class='curve' width='199' height='133' style='display: block' />").fadeIn(2000);
		if(s > 3) {
			slideImages1();
		} else {
			s++;
			setTimeout(slowDown, 2000);
		}
	}
	slowDown();
}
setInterval("slideImages1()", 5000);

Open in new window

LVL 1
pingeyegAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sylenixCommented:
you've set setInterval() too high than your timer. in order for you to achieve a smooth transition you must divide your timer into fractions so that the animation will appear smooth.

say, if you've set your timer to 2 seconds then chop it into ten so that'll be 200 milliseconds or your timer will fire up 10 times before the transition gets done, it'll be smoother that way.
0
Ovid BurkeConsultant InstructorCommented:
I would recommend that you use the jQuery Cycle plugin: http://jquery.malsup.com/cycle/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pingeyegAuthor Commented:
That doesn't seem to help matters any.
0
pingeyegAuthor Commented:
Thanks for the info.  Works great.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.