event when click on specific slide

pkloss's Avatar


13 Dec, 2012 03:04 PM

I'd like to make an onclick even for when a specific slide gets clicked on. I was looking at this:

  slider.ev.on('rsSlideClick', function() {
  // triggers when user clicks on slide
  // doesn't trigger after click and drag

but was unsure how to make it into an onlick for a specific slide. I'm using jquery and would like to basically set up, when slide 2 is clicked run this function: nav_click.call();

Thanks so much for any help I can get on this.

  1. Support Staff 1 Posted by Dmytro Semenov on 13 Dec, 2012 07:17 PM

    Dmytro Semenov's Avatar
    var slider = jQuery('.royalSlider').data('royalSlider');
    slider.ev.on('rsSlideClick', function() {
        if(slider.currSlideId === 2) {
         // do something


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


? 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