joyride
joyride copied to clipboard
Link for a button
I would like to be able to add a link to a button.
This could led for instance, to redirect users to a new page after the last step of the tour.
I was exactly trying to do this right now. +1
It seems impossible without modifying the source code :(
I actually could do it. It's quite obnoxious though. You have to give an instruction modal a css class, use that class to hide de next step button (the default button) and then write your own button inside that instruction modal (inside the
Glad I found this thread, I was having a similar issue, and adding a single call to add a hidden class to the automatically generated buttons wasn't working reliably for me, so below is the solution I was able to get working pretty easily using the pre_step_callback:
$(document).foundation({
joyride: {
modal: false,
pre_step_callback: function(){
//Preemtively hide autogenerated next buttons as needed
$('.joyride_next_hidden .joyride-content-wrapper .joyride-next-tip').addClass('hide');
}
}
});
With my joyride tooltip markup looking like...
<li data-id="your-id" class="joyride_next_hidden">
<h4>Ready to hide a button?</h4>
<p>Put your link in the button below...</p>
<a href="http://google.com" class="small button">Go to link</a>
</li>