Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Trigger "Click" previous button doesn't work #24

Open
alvisecastagna1 opened this issue Jan 25, 2019 · 1 comment
Open

Trigger "Click" previous button doesn't work #24

alvisecastagna1 opened this issue Jan 25, 2019 · 1 comment

Comments

@alvisecastagna1
Copy link

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

@cawalch
Copy link

cawalch commented May 5, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants