reload existing slider instance

centinel3's Avatar


02 Dec, 2012 04:03 PM

I have a question about refreshing the image gallery back to it's original state. I have an event that removes certain slides and need to allow the slider to reload back to it's original state. I see that there is a way to destroy a slider instance to populate it with new slides. Is there a way to easily just destroy the old slider and repopulate with the same instance?

   slides: '<div>New slide 1</div><div>New slide 2</div>',
   // other options... for example:
   controlNavigation: 'bullets'
  1. Support Staff 1 Posted by Dmytro Semenov on 02 Dec, 2012 06:37 PM

    Dmytro Semenov's Avatar


    No, in most cases slides markup is changed radically after initialization. If you want to dynamically re-initialize slider:

    • Save HTML markup in some variable before the first initialization.
    • Init slider (.royalSlider({...).
    • When you need destroy() it.
    • Insert initial markup (from first step).
    • Init slider again with new options.


  2. 2 Posted by centinel3 on 04 Dec, 2012 02:41 AM

    centinel3's Avatar

    Thank you!

  3. centinel3 closed this discussion on 04 Dec, 2012 02:41 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac