[Feature request] On reset add clicked element
Any chance that onReset Function will get also the clicked element ? In that way i'll could indicate where the user clicked to close the tour and improve my use in the driver for the end user.
Thanks
Hi @cuzi,
If you want to detect when the user clicked on the Close button you can do the following:
open the constants.js folder found inside src/common and change line 43 to
<button class="${CLASS_CLOSE_BTN}" onClick="CloseT()">Close</button>
if this alone didn't work go to driver.min.js and change driver-close-btn to include the onClick function like that:
<button class="').concat("driver-close-btn",'" onClick="').concat("CloseT()",'" >Close</button>
CloseT() will get triggered when you click on the close button, worked for me! :)
We just released v1.0 of driver.js which has been rewritten from the ground up. There are more simplified hooks which give you more control over the popover and the whole lifecycle. Please have a look at the docs and do let me know if you face any issues.