Fade Out append Caption

fabio's Avatar

fabio

12 Apr, 2019 10:10 AM

Hi,
i have some problem with Caption effect, this is my settings:

$('.rsGCaption').appendTo('#caption_content');

        slider.ev.on('rsAfterSlideChange', function(event) {
          $( "#slide_caption #caption_content .rsGCaption").animate({opacity: 1}, 500 );
          $( ".rsCaption h1").animate({left: 0}, 500 );
        });

        slider.ev.on('rsBeforeAnimStart', function(event) {
          $( "#slide_caption #caption_content .rsGCaption").animate({opacity: 0}, 500, function() {
            var h1_left = $('.rsCaption h1').width() - 100;
            $('.rsCaption h1').css('left', -h1_left);
          });
        });

It work but when fadeout the caption text it has already changed.
How can i animate before text changes?

Thanks

  1. Support Staff 1 Posted by Dmitry Semenov on 12 Apr, 2019 08:19 PM

    Dmitry Semenov's Avatar

    Hello,

    The content of caption changes in rsBeforeAnimStart and there is only one global caption element per slider.

    Each slide can contain any HTML content, add your animations direction into slides.

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