constructor
flagrate.createTutorial
flagrate.createTutorial(option) → flagrate.Tutorial
new flagrate.Tutorial
option
(Object
) – options.
Creates new tutorial.
option
steps
(Array; required): Array of step object.count
(Number; default0
): current count of step.onFinish
(Function): callback when finish.onAbort
(Function): callback when abort.onClose
(Function): callback when close.
step
target
(Element|String): Element to target. If target is undefined or not found, will creates flagrate.Modal.title
(String): Title for this step.text
(String): Descriptive text for this step.html
(String): Descriptive html for this step.onStep
(Function): Triggered whenever a step is started.onBeforeStep
(Function): Triggered at before starting of this step.onAfterStep
(Function): Triggered at after of this step.
onBeforeStep / onAfterStep
// async callback
function (done) {// if expects callback, will waits for it.
setTimeout(done, 1000);
}
// sync
function () {
// ...
}