joyride icon indicating copy to clipboard operation
joyride copied to clipboard

How can i get tour ID in the postRideCallback

Open intellisense opened this issue 12 years ago • 1 comments

For some reasons i needed to get the Tour ID (ol tag id) on which the the joyride was initiated in postRideCallback function. This function only has index and tip as parameter and i have no idea how to get the ID there, i have studied the library and nothing works.

intellisense avatar Dec 03 '13 02:12 intellisense

Declare global variable:

var joyride_parent_id;

Set joyride_parent_id in tip_template:

joyride_parent_id = $(opts.li).parent().attr('id');

Send the parent id in postRideCallback:

settings.postRideCallback(settings.$li.index(), settings.$current_tip, joyride_parent_id);

intellisense avatar Dec 13 '13 14:12 intellisense