API Reference
Control tours programmatically
WalkmanJS exposes a global API on the window object, allowing you to control tours programmatically from your JavaScript code.
Methods
WalkmanJS.start()Start the tour from the beginning
window.WalkmanJS.start()WalkmanJS.stop()Stop the tour and hide all tooltips
window.WalkmanJS.stop()WalkmanJS.next()Move to the next step
window.WalkmanJS.next()WalkmanJS.prev()Go back to the previous step
window.WalkmanJS.prev()WalkmanJS.goTo(stepId)Jump to a specific step by ID
window.WalkmanJS.goTo('step-3')Example Usage
JavaScript
// Start tour when user clicks a button
document.getElementById('help-btn').addEventListener('click', () => {
window.WalkmanJS.start()
})
// Skip to specific step
function showFeatureHighlight() {
window.WalkmanJS.goTo('feature-step')
}
// Stop tour on certain conditions
if (userHasCompletedOnboarding) {
window.WalkmanJS.stop()
}