Arun
Arun

Reputation: 1482

How to get next and previous step element in bootstrap tour js

we can get current step element by

var step = tour._options.steps[tour.getCurrentStep()];
var element=$(step.element);

Same as is there is any way to get next and previous step element in bootstrap tour js on onNext() and onPrev().

Thanks in advance for help

Upvotes: 1

Views: 1362

Answers (1)

Provie9
Provie9

Reputation: 379

The best way i think is this:

var step = tour._options.steps[tour.getCurrentStep()];
var element=$(step.element);

var step=tour.getStep(step - 1);

Upvotes: 2

Related Questions