We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The widget's current step is exposed via JS callbacks; those can be used to apply custom styling.
However it would be simpler and neater to control that via css directly. For example:
<div class="driver-popover" data-step-index="3" data-step-first="true" data-step-last="false"> ... </div>
Notice the [data-step-index], [data-step-first] and [data-step-last] attributes. I could easily target those in css.
[data-step-index]
[data-step-first]
[data-step-last]
The text was updated successfully, but these errors were encountered:
A workaround for now:
const driver = window.driver.js.driver; const driverObj = driver({ onPopoverRender: function(popover, options) { popover.wrapper.setAttribute('data-step-index', driverObj.getActiveIndex()); popover.wrapper.setAttribute('data-step-first', driverObj.isFirstStep()); popover.wrapper.setAttribute('data-step-last', driverObj.isLastStep()); }, });
But this is not ideal as it's messy and runs repeatedly. Best to be in the library itself.
Sorry, something went wrong.
No branches or pull requests
The widget's current step is exposed via JS callbacks; those can be used to apply custom styling.
However it would be simpler and neater to control that via css directly. For example:
Notice the
[data-step-index]
,[data-step-first]
and[data-step-last]
attributes. I could easily target those in css.The text was updated successfully, but these errors were encountered: