Add custom action to arrow button on last slide

davidquintal's Avatar

davidquintal

21 Aug, 2012 04:59 PM

Hello Dmitry,
Is there any way in which the last image in the gallery arrow button connect to another html as in your example: http://dimsemenov.com/themes/touchfolio/demo/gallery/31401-project/

?

Thank you.

  1. Support Staff 1 Posted by Dmitry Semenov on 21 Aug, 2012 05:17 PM

    Dmitry Semenov's Avatar

    Hello,

    There are a many ways how to do this. For example, after slider initialization you may unbind default event handler from right arrow and implement the custom action:

    $('.rsArrowRight').off('click').on('click.custom',function(e) { 
        e.preventDefault(); 
        if($(e.currentTarget).hasClass('rsArrowDisabled')) { 
            console.log('do something'); 
            return false; 
        } else { 
            $('.royalSlider').royalSlider('next'); 
        } 
    });
    

    Or you may use API http://dimsemenov.com/plugins/royal-slider/documentation/#api

    Dmitry

  2. 2 Posted by davidquintal on 21 Aug, 2012 05:41 PM

    davidquintal's Avatar

    I am not able to configure.
    Thanks for the help.

  3. Support Staff 3 Posted by Dmitry Semenov on 21 Aug, 2012 05:59 PM

    Dmitry Semenov's Avatar

    What exactly are you not able to configure? As you requested, with code that I sent you you can do some action when it's last slide and arrow is clicked. And you may create something like this - http://andrewgooch.com/

    If you don't have JavaScript knowledge I can't assist you, sorry.

    Dmitry

  4. Dmitry Semenov closed this discussion on 22 Aug, 2012 02:46 PM.

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