image slider
- Started
- Last post
- 26 Responses
- TheBlueOne0
Thus is also quite good: http://www.awkwardgroup.com/sand…
- BusterBoy0
I'm using the sudoSlider - seems pretty good. One thing I can't work out is how to stop the slider once that last image has been displayed. Anyone tried this?
- The basic demo does just that:
http://webbies.dk/Su…elahon
- The basic demo does just that:
- akrok0
hm, i found this. might try it. wonder do, how it acts if the images are different sizes.
http://qeqnes.wordpress.com/2010…
- Fax_Benson0
This one's quite slick - not sure how good it is if you've got lots of different size images though.
- < cool...haven't seen that one yet.dbloc
- This one is great!flyingnowhere
- Nathan_Adams0
Daithi, I've done something similar before. The trick is to have a 'next page' link, but have it hidden. Use the onAfter callback to hide the 'next slide' link and show the 'next page' link, when you get to the last slide. (In my case, I made both links look exactly the same, so to the user it doesn't look like anything is changed).
Here's the script I used. Obviously change the selectors to suit.
$(function() {
$('#contentArea').cycle({
fx: 'fade',
timeout: 0,
next: '#nextSlide',
prev: '#prevSlide',
cleartype: 1,
after: onAfter
});
});function onAfter(curr,next,opts) {
var caption = (opts.currSlide + 1) + '/' + opts.slideCount;
$('.pageNumbers').html(caption);var index = opts.currSlide;
$('#prevSlide')[index == 0 ? 'hide' : 'show']();
$('#prevPage')[index == 0 ? 'show' : 'hide']();
$('#nextSlide')[index == opts.slideCount - 1 ? 'hide' : 'show']();
$('#nextPage')[index == opts.slideCount - 1 ? 'show' : 'hide']();
}