首页 > 解决方案 > How to have a multipage-multiple tour site using intro.js?

问题描述

I'm currently new to intro js and I have this big project up

I need to start a tour on page 1, that will continue on page 2, then it needs to go back to page 1 and start another tour that will continue on page 3

I hope someone can help me :(

标签: javascriptintro.js

解决方案


examples/文件夹中有一个多页演示。

  • 克隆项目,examples/index.html用浏览器打开文件。

  • 单击Multi-Page introduction并查看源代码。

在底部你会发现

<script type="text/javascript">
  document.getElementById('startButton').onclick = function() {
    introJs().setOption('doneLabel', 'Next page').start().oncomplete(function() {
      window.location.href = 'second.html?multipage=true';
    });
  };
</script>
  • 使用它开始。

  • 将示例代码发布到 github 或其他地方。

  • 当您遇到困难时更新您的问题。


推荐阅读