Ok, so I have a very simple gallery right now. It has a next and previous working buttons, and I have it loop every couple seconds. The only problem I have is that when I click next or previous it doesn't continue the loop after I hit next again.
Here are the two snippets of code.
var li = slides.eq(current),
canvas = li.find('canvas'),
nextIndex = 0;
// Depending on whether this is the next or previous
// arrow, calculate the index of the next slide accordingly.
nextIndex = current >= slides.length-1 ? 0 : current+1;
nextIndex = current <= 0 ? slides.length-1 : current-1;
I've been trying to figure this out without posting on the forums, but I am stumped.
// The window.load event guarantees that
// all the images are loaded before the
// auto-advance begins.
var timeOut = null;
// The simulated parameter is set by the
// trigger method.
// A real click occured. Cancel the
// auto advance animation.
// Simulating a click on the next arrow.
// Schedulling a time out in 5 seconds.
timeOut = setTimeout(autoAdvance,1000);
Thanks for the help
This is the tutorial I followed.