'rsAfterInit' code sample

daniel.r.arenas's Avatar

daniel.r.arenas

30 Apr, 2020 08:41 PM

I'm trying to test this API.

I'm quite lost in this explanation in the documentation:

---
// Next events TRIGGER DIRECTLY ON SLIDER INITIALIZATION
// if you bind them after slider init they'll not fire
// used for module development
---

A working sample code will be helpful.

Thanks.

  1. Support Staff 1 Posted by Dmitry Semenov on 01 May, 2020 06:40 AM

    Dmitry Semenov's Avatar

    Hello,

    It's used by some modules. For example, global caption - https://gist.github.com/dimsemenov/b67a55ad09fc2a49e592ea67473c2da2

    If you just want to execute some code when slider is initialized - simply run it after you do $('.slider').royalSlider(), no need for rsAfterInit.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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