I don't get the rsAfterInit Event fired.

petergeller's Avatar


20 Aug, 2012 02:29 PM

Maybe you can show me how you would handle it?

                var sliderInstance = $('.royalSlider').royalSlider({
                   // options go here
                    // as an example, enable keyboard arrows nav
                    keyboardNavEnabled: true,
                    slidesSpacing: 0,
                    autoScaleSlider: false,
                    controlsInside: false,
                    imageScaleMode: false

                    sliderInstance.ev.on('rsAfterInit', function() {
                        // after slide change

Thank you


  1. Support Staff 1 Posted by Dmytro Semenov on 20 Aug, 2012 02:51 PM

    Dmytro Semenov's Avatar


    This event triggers directly on slider intitialization (when you call royalSlider()), if you bind it after slider it'll not fire.

    Such event is used for module development, if you want to to know how to use is it take a look, for example, inside unpacked jquery.rs.global-caption.js module.


  2. Dmytro Semenov closed this discussion on 21 Aug, 2012 12:19 PM.

  3. petergeller re-opened this discussion on 23 Aug, 2012 07:32 AM

  4. 2 Posted by petergeller on 23 Aug, 2012 07:32 AM

    petergeller's Avatar

    Hi Dimitry,

    my problem is, i don't understand how you use the modules.
    In your example i don't see how you use the separate caption module?

    If i read your documentation, i can see only how you set the html structure to have captions, but i don't get it how you build the connection to the jquery.rs.global-caption.js . I would like to know how you bind a module to royalslider? Would be great if you show me short how you would do it?

    Thx Peter

  5. Support Staff 3 Posted by Dmytro Semenov on 23 Aug, 2012 07:40 AM

    Dmytro Semenov's Avatar


    Module is added and 'hooked' automatically when you add its JS code to page. You don't need to do any extra work.

    You can download minified version with modules that you need from build tool - http://dimsemenov.com/private/home.php or include modules manually if you need unminified version of them.


  6. 4 Posted by petergeller on 23 Aug, 2012 07:44 AM

    petergeller's Avatar

    Ok, i missed that i have to activate the globalCation to true :-)
    Are these modules inside the dev-js integrated to the royalslider minified js, or do i have to add them separately?



  7. Support Staff 5 Posted by Dmytro Semenov on 23 Aug, 2012 07:53 AM

    Dmytro Semenov's Avatar

    Files in dev-jsfolder and in build tool are the same, just in build tool everything is minified and packed in one file.


  8. 6 Posted by petergeller on 23 Aug, 2012 08:04 AM

    petergeller's Avatar

    Last question...

    How would you integrate a preloader like http://heartcode.robertpataki.com/canvasloader/

    the nicest way?

  9. Support Staff 7 Posted by Dmytro Semenov on 23 Aug, 2012 08:11 AM

    Dmytro Semenov's Avatar

    Please create new thread if you have questions unrelated to subject.

    The best way to change the preloader is to replace gif file in preloaders folder. I don't recommend using such js-based html5 canvas loaders, as they hurt performance.


  10. Dmytro Semenov closed this discussion on 23 Aug, 2012 08:11 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