EragonJ / Trip.js

🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.

Home Page:https://eragonj.github.io/Trip.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Let us optionally pass a step index to next()

exside opened this issue · comments

commented

This would be very helpful to skip or go back to certain steps, basically non-sequential tours (probably only useful in more advanced scenarios)...

Seems quite simple and not sure why it wasnt put there in the first place =)...e.g. something like that would be awesome:

trip.next(4); // jumps to step 5 (0 based index)

keep up the great work!

EDIT: Maybe it would be better (for backward compat, semantics etc.) not use the next() method for that but introduce a new method like "goTo()" or "goToStep()" or something alike

interesting idea, let me think about it ~

I think there is no backward compatibility issue here hmmm, maybe we can just put that to next() directly.