我在我的网站中使用 bootstrap 并解释我想使用bootstrap tour的网站。我已经在我的测试页面中实现了这个并且工作正常。但是当加载页面时游览开始,我想在单击按钮时开始游览。我已经按照这篇文章来实现我的引导之旅。
这是引导程序演示的 javascript:
(function(){
var tour = new Tour({
storage : false
});
tour.addSteps([
{
element: ".tour-step.tour-step-one",
placement: "bottom",
title: "Welcome to our landing page!",
content: "This tour will guide you through some of the features we'd like to point out."
},
{
element: ".tour-step.tour-step-two",
placement: "bottom",
title: "Main navigation",
content: "Here are the sections of this page, easily laid out."
},
{
element: ".tour-step.tour-step-three",
placement: "top",
backdrop: true,
title: "Main section",
content: "This is a section that you can read. It has valuable information."
},
]);
// Initialize the tour
tour.init();
// Start the tour
tour.start();
}());
这是html部分:
<div class="content-section-a tour-step tour-step-one"> One <br>
<div class="content-section-a tour-step tour-step-two"> Two <br>
<div class="content-section-a tour-step tour-step-three"> Three <br>
如何通过单击按钮开始我的旅行?
谢谢