marb
marb

Reputation: 53

Jquery Cycle2 goto slide

I'm using jquery cycle2 nested slider for my project. On each slide I have image/trigger on which I need to click and go to last slide(4). I have it as follow:

$("#test").click (function(){
    $('.cycle-slideshow').cycle('goto', 4);
});

This does not work, can someone tell me what I'm doing wrong?

Upvotes: 1

Views: 2960

Answers (1)

Gabriel Pereira
Gabriel Pereira

Reputation: 53

Well, you probably have figured it out but for someone that is stuck at this issue, all you need to do is to add a return false; at the end:

$("#test").click(function(){
    $('.cycle-slideshow').cycle('goto', 4);
    return false;
});

Very very simple, isn't? I strongly recommend you to read the Cycle's API at: http://jquery.malsup.com/cycle2/api/#commands

Upvotes: 3

Related Questions