EragonJ / Trip.js

🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.
https://eragonj.github.io/Trip.js/
MIT License
793 stars 111 forks source link

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

Closed exside closed 8 years ago

exside commented 8 years ago

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

EragonJ commented 8 years ago

interesting idea, let me think about it ~

EragonJ commented 8 years ago

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