bulma-steps
bulma-steps copied to clipboard
Trigger "Click" previous button doesn't work
Hi, I'm trying to trigger the previous button by clicking another element, but nothing happen. Click works (console.log appear) but doesn't go back to previous step.
How can i fix?
Thanks
You could attach an EventListener
to directly call previous_step
.
const otherBackBtn = document.getElementById('other-prev-button');
const otherNextBtn = document.getElementById('other-next-button');
const mySteps = new bulmaSteps('#mySteps');
otherBackBtn.addEventListener('click', mySteps.previous_step.bind(mySteps), false);
otherNextBtn.addEventListener('click', mySteps.next_step.bind(mySteps), false);
Example jsfiddle