I am trying to find a way to disable or deactivate an already initialized Slider. I want to give a user the option of turning off the slider to make a "list all" kind of feature (all the slides just basically turn back to their original html forms). I would also want to have a way to re-enable it again. A toggle switch basically.
Is there an easy way to achieve this using the slider?
Any help would be greatly appreciated.
I made a demo (http://jsfiddle.net/Mottie/JMgeC/346/) which basically removes the class names so the stylesheet isn't applied. Then reapplies them after you click the activate button. Now, this keeps all functionality intact, so if you added a lightbox that pops up when the image is clicked, that will still work. Here is the code I used in the demo:
var s = $('#slider')
.find('.anythingControls, .arrow, .cloned').show();
var s = $('#slider');
s.data('AnythingSlider').startStop(false); // stops the slideshow
.find('.anythingControls, .arrow, .cloned').hide();
If you need AnythingSlider to be completely disabled, then I'd have to add a destroy method or something and it'll take a bit more coding.
I'm going to go ahead and close this issue. If you need something more than what I have above, please feel free to reopen the issue and leave a comment :)