【发布时间】:2019-06-21 07:46:19
【问题描述】:
我在页面中有此代码。我正在尝试使 bootstrap-tour 工作,但它没有发生。我究竟做错了什么?我在这里错过了什么?
<!DOCTYPE html>
<html>
<head>
<link href="bootstrap.css" rel="stylesheet">
<link href="bootstrap-tour.css" rel="stylesheet">
<link href="bootstrap-tour.min.css" rel="stylesheet">
<!--[if lt IE 9]><script src="html5shiv.js"><![endif]-->
<script>
// Instance the tour
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>
</head>
<body>
<div id="#content">
Hello, World!
</div>
<br><br><br>
<div id="#content1">
Another Hello, World!
</div>
<script src="jquery.js"></script>
<script src="bootstrap.tooltip.js"></script>
<script src="bootstrap.popover.js"></script>
<script src="bootstrap-tour.js"></script>
<script src="bootstrap-tour.min.js"></script>
</body>
</html>
我在 google 上搜索过,但似乎没有人在安排旅行时遇到过任何麻烦。我不知道我错过了什么。可以是一些简单的事情。帮帮我,伙计们。我已包含这些文件:
CSS::
Bootstrap.css v3.0.0
bootstrap-tour.css - v0.8.0
bootstrap-tour.min.css - v0.8.0
JS::
bootstrap-tour.min.js - v0.8.0
bootstrap-tour.js - v0.8.0
bootstrap-popover.js v2.0.4
bootstrap-tooltip.js v2.0.4
jQuery JavaScript Library v1.9.0
【问题讨论】:
-
我认为您应该在头部调用您的脚本或将编写的脚本移动到所有库下方。
-
它需要 jquery 你明白了吗?
-
不,没有用。我只是尝试了两种方式。
-
你能显示你正在调用的所有脚本吗?完整的代码?
-
查看浏览器控制台中抛出的错误。
标签: jquery html twitter-bootstrap bootstrap-tour