Javascript forward backward buttons
I'm using the s3Slider javascript slideshow on the homepage of a site I am developing:
http://alexisparkinn.com/
I really like this slideshow but it has no way to enable the user to go to the next or previous image.
How can I add these buttons? Does anybody know the necessary javascript code I need to use or what changes should be made.
Suggestions? Any help would be greatly appre开发者_如何学运维ciated.
Thanks!
I know you didn't ask for suggestions, but let me just throw this out there as a solution: http://jquery.malsup.com/cycle/
After messing around with a ton of sliders, I've ended up going back to this one time after time. (and there is a 4KB version if all you want is the fade effect)
It has pretty decent documentation and is overall pretty easy and straightforward to use.
Anyway, just wanted to throw that out there. Best of luck to you!
Just to hack something in, I'd modify your s3slider copy to include something like this (insert at line 38)
$(element).bind("s3slidernext", function() {
current = items[currNo+1];
fadeElement(false);
});
Then you can probably just call
$('#s3slider').trigger("s3slidernext");
To move the slider forward. Bind that to a button and you're all set.
there are many jquery libraries that can help you out there like http://sorgalla.com/projects/jcarousel/
精彩评论