driver.js icon indicating copy to clipboard operation
driver.js copied to clipboard

[Feature request] On reset add clicked element

Open cuzi opened this issue 7 years ago • 1 comments

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

cuzi avatar Feb 20 '19 14:02 cuzi

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! :)

ameeee avatar May 30 '22 15:05 ameeee

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.

kamranahmedse avatar Jul 05 '23 17:07 kamranahmedse