Johann-S / bs-stepper

A stepper for Bootstrap 4.x
https://johann-s.github.io/bs-stepper/
MIT License
448 stars 89 forks source link

How to get current index of the stepper? #232

Open rabbanirasha opened 3 years ago

rabbanirasha commented 3 years ago

For example, if I am at the second step of a form and click next, I want to get a console log of "2", or the id of the corresponding div. I tried to use event.detail.indexStep but it does not work. There's stepper.to(n) to jump to step n, but there's nothing that will return n of current step, something like stepper.currentIndex(). I need it to validate my form with Parsley. Alternatively, if a sample code of bs-stepper with parsley integration can be given, then that would be great!

SouthViking commented 3 years ago

I'm looking for the same 👍 Would be nice to have a stepper.getCurrentStep() method into the Stepper Class.

leandroruel commented 3 years ago

guess you can image

rodrigocabraln commented 3 years ago

Add this:

Captura

Captura2