driver.js
driver.js copied to clipboard
I want to add new Custom Button on Popover. How to add new buttons and also How to add click event on to it?
Hi, I am using driver.js in my react application. I need to add a new custom button on the popover. And also that button will have a click event. I shall be thankful to you for this. I tried using the template string literal in the "description " of "popover " but the onClick function is not working. Let me know if you have any solution for this.
Dealing with the same issue here.
I cant call the onclick function. it just blinks on the screen. Any updates?
If there's no event.stopPropogation in the library code (Which should be the case) then you can catch the clicks on any elements (and/or buttons) by ->
document.addEventListener('click', ({target}) => {})
Regards the buttons creation I think that you can hide the footer and to create buttons by adding them to the description html template! In that way you can walk-around the template of DriverJS if it restricts you.
We just released v1.0 of driver.js which has been rewritten from the ground up. Please Look at the custom button docs page.