Modifying a jQuery infinite carousel - manual navigation
I'm trying to modify a carousel with some manual navigation between "slides". I've followed this guide.
This is my result.
Can anyone explain to me how I can make so it's possible to:
- Choose the second slider (with the manual navigation)
- Step right using the arrow that points to right
Without being redirected back to the first "slide". I understand that it's in the } else if 开发者_StackOverflow中文版(page > pages) {
-case, and it's resetting the page-variable. But how can I avoid it? I thought the goto
-method was supposed to take care of the current page association.
I've been doing this for hours and I'm just more confused.
(I know my workaround for the manual navigation is fugly ;) )
Thanks in advance!
The problem is in line 92 of jquery-lol.js:
jQuery('#splash-splash').trigger("goto", [ navVal ]);
Change it to:
jQuery('#splash-splash').trigger("goto", parseInt(navVal));
The goto event assumes that the page parameter is numeric. Alternatively, in case you don't want to worry about it in the future, insert this after line 39 (making it the first line of the gotoPage function):
page = parseInt(page);
精彩评论