New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get driver to execute from a button click #221
Comments
You need to add |
Thank you for this. I saw that line all the way at the end of the doc
But I'm no expert in javascript, and this wasn't obvious to me. Here's an example I used, and it may be helpful for others in the future: Button: Event Code
Hope this helps someone else. |
@lavafactory you need to put document.querySelector("#tutorial").addEventListener('click', function(e){
e.stopPropagation();
const driver = new Driver();
driver.highlight({
element: '#title',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
}
});
}) |
I'm sure I'm doing something wrong here. Driver seems to work fine if it's included inline in a page. For example
However if I wrap it in a function and try to call it from a click like this, it fails:
Essentially the screen dims like it's going to popover, then goes back to normal without showing the pop.
The text was updated successfully, but these errors were encountered: