passing in selector to listen for click to step next(new feature)
See original GitHub issuethe feature to pass in a selector to listen for click into each step i.e
{
selector: '.first_step',
content: 'First step in Tour',
nextTriggerClickSelector: '#first_button'
},
{
selector: '.second_step',
content: 'Second step in Tour',
},
At 1st step if #first_button
is clicked the tour steps to next step (.second_step
). the nextTriggerClickSelector listener is removed after the tour has gone to some other step. or tour has been closed.
I can def work on this and submit PR if it sounds useful to others @elrumordelaluz
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:12 (4 by maintainers)
Top Results From Across the Web
EventTarget.addEventListener() - Web APIs | MDN
The event listener can be specified as either a callback function or an object whose handleEvent() method serves as the callback function. The ......
Read more >mat-step onclick event function - angular - Stack Overflow
So, I just ran into this problem and the easy fix is to wrap the actual content of the step label in a...
Read more >JavaScript Event Listeners Ultimate Guide
One common use case for event listeners is listening for click events on a button. const button = document.querySelector("button") button.
Read more >How to Use Browser Event Listeners in React for Search and ...
Step 0: Starting a new React app with a Next.js demo project; Step 1: Automatically ... A super common event is listening for...
Read more >JavaScript Event Listener Example Code - freeCodeCamp
Sometimes we may want to know more information about the event, such as what element was clicked. In this situation, we need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
also wanted to say great library. your approach to allow deep configurability in usage is what attracted me to try the lib. In regards to button clicks it may also be needed allow ability to disable forward navigation so button click is required to step-through.
not necessary, if you’ll use
change
orinput
listeners fires on all cases.The important point is what to give the response to the User to let them make the logic to fire the
trigger
. I don’t know what you have in mind as a starting point, so let start a PR and move forward commenting/reviewing the code, if it’s ok for you.