About "slides" option

ontoin's Avatar

ontoin

19 Dec, 2012 02:43 AM

We use "slides" option according to "http://help.dimsemenov.com/kb/royalslider-javascript-api/replacing-all-slides-dynamically"
like
slides: $('#videoListView').html(),

#videoListView includes whitespaces between tags. (for example, New line, Tab, Space)

But, RoyalSlide handles whitespace like another tag.

slides: '<div>New slide 1</div><div>New slide 2</div>' //it works correctly.

slides: '<div>New slide 1</div> <div>New slide 2</div>', //It makes another empty slide between real slides.

Please let me know how to fix it.

  1. Support Staff 1 Posted by Dmytro Semenov on 19 Dec, 2012 05:09 PM

    Dmytro Semenov's Avatar

    Hi,

    You can pass directly jQuery object - $('#videoListView').children();

    RoyalSlider just does $(self.st.slides)

    Dmitry

  2. 2 Posted by ontoin on 21 Dec, 2012 02:40 AM

    ontoin's Avatar

    It works.
    Thanks a lot.

  3. ontoin closed this discussion on 21 Dec, 2012 02:41 AM.

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

Keyboard shortcuts

Generic

? 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