Delay Active Slide

hebbarj's Avatar

hebbarj

19 Dec, 2017 07:50 PM

Hello,
Great plugin, I've used it a lot and appreciate the work that goes into it.

I'm trying to set a scale transition on the slider so the images slowly zoom in. I have added active class, but since the first slide loads with active class, the scaling effect does not happen. It works fine on the subsequent slides and if I go back to the original it works. How do I delay active class getting added to the first slide, if just by a split second? Do I need to tap the API or is there another way to set this?

Thanks in advance.

  1. 1 Posted by hebbarj on 19 Dec, 2017 07:57 PM

    hebbarj's Avatar

    Hmmm, strange. It works on regular page refresh, but on a hard refresh, doesn't work. Only in chrome, not FF.

  2. Support Staff 2 Posted by Dmitry Semenov on 20 Dec, 2017 06:40 AM

    Dmitry Semenov's Avatar

    Hello,

    You may add class to the first slide manually and control the delay by yourself, e.g.:

    setTimeout(function() {
      $('.royalSlider').data('royalSlider').currSlide.content.addClass('some-class');
    }, 200):
    
  3. 3 Posted by hebbarj on 20 Dec, 2017 04:14 PM

    hebbarj's Avatar

    Thanks for the quick response. Wasn't sure if the delay would have an affect here but will try it. Thank you

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