joyride
joyride copied to clipboard
How can i get tour ID in the postRideCallback
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.
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);