views:

16

answers:

0

I have a set of 15 horizontal divs that slide using jQuery. It works great until I get to slide 11. From then on instead of moving to the next slide it will loop through the whole sequence first before it gets to it. So it still works but the loop slide is a bit annoying.

Any help is appreciated.

//curPanel = is the current div slide

var leftValue =  - base.panels.eq(curPanel-1).position().left;

base.curPanel = curPanel;
base.container.stop().animate({
       left : leftValue
   }, 500, function(){
       base.currentlyMoving = false;
});