Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

image gallery continuous scrolling

Avatar of Kyle Hamilton
Kyle HamiltonFlag for United States of America asked on
Web Languages and StandardsJavaScriptWeb Development
10 Comments1 Solution590 ViewsLast Modified:
I have a javascript image slider that gets images from an xml file, and runs through them in order. After the last image, it goes in reverse.

It's kind of hard to explain. When you scroll all the way to the right you can see what I mean.

I would like it to slide through the images continuously. So that when it reaches the end, the next image would be image one, instead of a blank space.

I believe the code below is where this happens, but I'm a dork, so if you need the whole js file I can post it.

Thanks in advance.
/* ==== animation loop ==== */ 
                run : function (res) { 
                        /* ---- move all images ---- */ 
                        var i = this.NF; 
                        while (i--) this.diapos[i].move(res); 
                        /* ---- autoscroll ---- */ 
                        if (this.time_out) { 
                                if (this.time > this.time_out) { 
                                        this.view += this.time_dir; 
                                        if (this.view >= this.NF || this.view < 0) { 
                                                this.time_dir = -this.time_dir; 
                                                this.view += this.time_dir * 2; 
                                        this.time = 0; 
                                        this.time_out = this.time_inter; 
Avatar of glasnhost

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answers