gpt4 book ai didi

jquery - 如何使 bootstrap-tour 工作?

转载 作者:太空宇宙 更新时间:2023-11-04 13:34:56 28 4
gpt4 key购买 nike

我在页面中有这段代码。我正在尝试使 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>

我在谷歌上搜索过,但似乎没有人在安排旅游方面遇到过任何问题。我不知道我错过了什么。可以是一些简单的东西。帮帮我伙计们。我已经包含了这些文件:

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

最佳答案

参见 http://jsfiddle.net/4uS59/

你的 html 中有错误的 id

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

应该是

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

关于jquery - 如何使 bootstrap-tour 工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20816893/

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