I want to use intro.js with more than two pages. Is it a simple way to do it?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
Yes, you can. If you look at code for intro.js example with multiple pages https://github.com/usablica/intro.js/tree/master/example/multi-page you can see that first page has code that redirects to second page after user click the button:
And on the second page we use regex to check if user is going through intro. You will need to add code like that to each page, with url address to the page that should be shown next. If you want to have more than one "intro flows" (since the question title said
multiple
), you can give them names or numbers. Then, instead of addingmultipage=true
you can usemultipage=beta_version
ormultipage=1
and use reqex to check if user should see intro, and if yes, which one.That might be not the nicest code ever :), but ( like Rich said ) without more information I can only guess this is what you want to do? But hopefully, it will give a general idea.