-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
[Feature Request] Expose step index in DOM #490
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: