我试图在我的一个项目中使用 Foundation Joyride,但我根本无法让它出现。
有谁知道我可能会错过什么?我到了我制作了一个单独的 html 并剥离它以找出是否有人与之冲突的地步,控制台也没有显示任何内容。
这是代码:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title</title>
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/foundation-icons.css" />
</head>
<body>
<div class="home-screen">
<div class="row">
<div id="headerDiv" class="large-12 columns large-text-center">
<h1>Welcome!</h1>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<div class="panel">
<h3 id="subtitle">Subtitle </h3>
<a id="startButton" class="medium success button radius">Start!</a>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- At the bottom of your page but inside of the body tag -->
<ol class="joyride-list" data-joyride>
<li data-id="headerDiv" data-text="Next" data-options="tip_location: top">
<p>Hello and welcome to the Joyride documentation page.</p>
</li>
<li data-id="subtitle" data-class="custom so-awesome" data-text="Next">
<h4>Stop #1</h4>
<p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
</li>
<li data-id="startButton" data-button="Next" data-options="tip_location:top;tip_animation:fade">
<h4>Stop #2</h4>
<p>Get the details right by styling Joyride with a custom stylesheet!</p>
</li>
<li data-button="End">
<h4>Stop #3</h4>
<p>It works as a modal too!</p>
</li>
</ol>
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/foundation/foundation.joyride.js"></script>
<script src="js/vendor/jquery.cookie.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
PS:我确实尝试将<ol>
所有脚本标签放在下面,但这没有任何区别。