Deactivate Slide Show #85

asab5241 opened this Issue May 16, 2011 · 2 comments


None yet

2 participants


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.

Mottie commented May 16, 2011

Hi asab5241!

I made a demo ( 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:

// Activate
    var s = $('#slider')
        .find('.anythingControls, .arrow, .cloned').show();

// Deactivate
    var s = $('#slider');'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.

Mottie commented May 17, 2011

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 :)

@Mottie Mottie closed this May 17, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment