iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
There's a slight modification I'd like to suggest around line 985:
if(!iosSliderSettings[sliderNumber].autoSlide) return false;
if( slideNodes.length < 2 ) {
// clear the timeouts from the previous set of nodes
for(var j = 0; j < scrollTimeouts.length; j++) {
clearTimeout(scrollTimeouts[j]);
}
}
this prevents the slider from scrolling to non-existent slides if switched from 3 slides to 2 dynamically via .iosSlider('update');. The "for()" loop takes care of the dots on the bottom to behave properly.
I'm using Meteor.js so here's part of my code where I re-apply the settings which aren't being remembered btween the 'updates':
I have to re-apply those settings for returning from 1-node to mutli-node sliders. Meteor's engine (blaze) dynamically changes the amount of slides (.item) within the DOM. So I have to call that update thingy.
Seems to be causing an infinite loop which hangs the browser after some time.
I'm still looking for a solution to terminate the autoSlide for 1-node sliders upon update.
There's a slight modification I'd like to suggest around line 985:
this prevents the slider from scrolling to non-existent slides if switched from 3 slides to 2 dynamically via
.iosSlider('update');
. The "for()" loop takes care of the dots on the bottom to behave properly.I'm using Meteor.js so here's part of my code where I re-apply the settings which aren't being remembered btween the 'updates':
I have to re-apply those settings for returning from 1-node to mutli-node sliders. Meteor's engine (blaze) dynamically changes the amount of slides (.item) within the DOM. So I have to call that
update
thingy.Danks.