我正在尝试在我的Web应用程序中使用bootstrap tour.前5分钟一切正常,我看到了弹出的步骤,第一次也是唯一的一次.然后弹出窗口就消失了.我尝试了很多方法甚至重新启动了电脑,事实证明,每次我清除浏览器缓存,它都可以工作一次.然后我需要再次清除缓存.
代码如下所示:
helpButton.click(function() {
if (window.steps === undefined)
return;
alert("element: " + window.steps[0].element + ", title: " + window.steps[0].title + ", content: " + window.steps[0].content + ", val: " + $(window.steps[0].element).val());
var tour = new Tour({
steps: window.steps
});
tour.init();
tour.start();
alert("finished.");
});
Run Code Online (Sandbox Code Playgroud)
步骤看起来像:
<script type="text/javascript">
var steps = [
{ element: "#choose-team", title: "????", content: "????????????????", position: "n" },
{ element: ".hidden-editor:first", title: "????2", content: "????????????????2", position: "n" }
];
Run Code Online (Sandbox Code Playgroud)
任何的想法?谢谢.