Constructor
new Tour(options) → {Tour}
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
The options for the tour Properties
|
Extends
- Evented
Classes
Methods
addStep(options, index) → {Step}
Adds a new step to the tour
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Step |
An object containing step options or a Step instance |
index |
number |
The optional index to insert the step at. If undefined, the step is added to the end of the array. |
addSteps(steps)
Add multiple steps to the tour
Parameters:
Name | Type | Description |
---|---|---|
steps |
Array.<object> | Array.<Step> |
The steps to add to the tour |
back()
Go to the previous step in the tour
(async) cancel()
Calls _done() triggering the 'cancel' event
If confirmCancel
is true, will show a window.confirm before cancelling
If confirmCancel
is a function, will call it and wait for the return value,
and only cancel when the value returned is true
complete()
Calls _done() triggering the complete
event
getById(id) → {Step}
Gets the step from a given id
Parameters:
Name | Type | Description |
---|---|---|
id |
Number | String |
The id of the step to retrieve |
getCurrentStep() → {Step|null}
Gets the current step
hide()
Hide the current step
isActive() → {boolean}
Check if the tour is active
next()
Go to the next step in the tour
If we are at the end, call complete
removeStep(name)
Removes the step from the tour
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The id for the step to remove |
show(key, forward)
Show a specific step in the tour
Parameters:
Name | Type | Default | Description |
---|---|---|---|
key |
Number | String | 0 |
The key to look up the step by |
forward |
Boolean | true |
True if we are going forward, false if backward |
start()
Start the tour