gpt4 book ai didi

javascript - Bootstrap 之旅不工作

转载 作者:太空宇宙 更新时间:2023-11-04 09:33:23 24 4
gpt4 key购买 nike

我正在为我设置的一个非常简单的测试页面测试 Bootstrap Tour。内容显示,但由于某种原因,游览功能没有启动。谁能告诉我我可能做错了什么?

谢谢 :)

请在下面找到我的代码

<html>

<head>
<meta charset="utf-8">
<title> This is a testing page for bootstrap tour </title>

<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../bootstraptour/build/css/bootstrap-tour.min.css" rel="stylesheet">
<link href="../bootstraptour/build/css/bootstrap-tour-standalone.min.css" rel="stylesheet">

</head>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../bootstrap/js/jquery.min.js"></script>
<script src="../bootstrap/js/bootstrap.min.js"></script>
<script src="../bootstraptour/build/js/bootstrap-tour.min.js"></script>
<script src="../bootstraptour/build/js/bootstrap-tour-standalone.min.js"></script>

<script>
var tour = new Tour();

// Add your steps. Not too many, you don't really want to get your users sleepy
tour.addSteps([{
element: "#content", // string (jQuery selector) - html element next to which the step popover should be shown
title: "Title of my step", // string - title of the popover
content: "Content of my step" // string - content of the popover
}, {
element: "#content1",
title: "Title of my step",
content: "Content of my step"
}]);

// Initialize the tour
tour.init();

// Start the tour
tour.start();
</script>


<body>
<div id="content">
Hello, World!
</div>
<br>
<br>
<br>
<div id="content1">
Another Hello, World!
</div>
</body>

</html>

最佳答案

您应该包括任一个 bootstrap-tour.min.css/bootstrap-tour.min.js(当您包括bootstrap.min.css/bootstrap.min.js 自己)或 bootstrap-tour-standalone.min.css/bootstrap-tour-standalone.min.js,但不能同时使用。请参阅 bootstrap tour homepage 上的说明.

这是一个工作片段:

var tour = new Tour();

// Add your steps. Not too many, you don't really want to get your users sleepy
tour.addSteps([{
element: "#content", // string (jQuery selector) - html element next to which the step popover should be shown
title: "Title of my step", // string - title of the popover
content: "Content of my step" // string - content of the popover
}, {
element: "#content1",
title: "Title of my step",
content: "Content of my step"
}]);

// Initialize the tour
tour.init();

// Start the tour
tour.start();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.11.0/js/bootstrap-tour-standalone.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.11.0/css/bootstrap-tour-standalone.min.css" rel="stylesheet"/>

<div id="content">
Hello, World!
</div>
<br>
<br>
<br>
<div id="content1">
Another Hello, World!
</div>

关于javascript - Bootstrap 之旅不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40583862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com