sorich87 / bootstrap-tour

Quick and easy product tours with Twitter Bootstrap Popovers
http://bootstraptour.com
MIT License
4.44k stars 942 forks source link

removeStep function? #447

Open askaza opened 9 years ago

askaza commented 9 years ago

Hi! I have few questions about steps array.

  1. I found in API addSteps([]) Is it mean that I can add few steps in list even if bootstrap-tour already was initialized?
  2. How can remove (or skip) few steps in list without stopping tour?

For example I have list of fields in the form, which are steps of tour. If user filled some field, I would like to remove it from tour. How to do it?

stratdaz commented 8 years ago

Hi askaza,

Seems like a logical method to have in there so I just added it myself ...

Tour.prototype.removeStep = function (stepIndex) {
    this._options.steps.splice(stepIndex, 1);
};

Does what I need to do.