Open alvisecastagna1 opened 5 years ago
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
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