我遇到了一个惊人的插件http://www.jquery-steps.com/Examples,我一直在努力使它工作,但它似乎我错过了什么。
我已经将引用添加到文件:
<script src="../Scripts/jquery.steps.min.js" type="text/javascript"></script>
我的标记看起来如下:
<div id="example-basic">
<h3>Keyboard</h3>
<section>
<p>Try the keyboard navigation by clicking arrow left or right!</p>
</section>
<h3>Effects</h3>
<section>
<p>Wonderful transition effects.</p>
</section>
<h3>Pager</h3>
<section>
<p>The next and previous buttons help you to navigate through your content.</p>
</section>
</div>
Javascript如下所示:
<script type="text/javascript">
$("#example-basic").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
autoFocus: true
});
</script>
发布于 2015-11-11 19:22:05
发布于 2015-05-20 04:54:45
我们必须使用最新的jquery,因为这个插件使用jquery的函数。这解决了我的问题。
http://code.jquery.com/jquery-2.1.4.js
发布于 2019-07-03 15:26:52
必须将最后一个脚本代码放在body标记结束之前,如下所示:
<body>
<div id="steps">
<h1>First Step</h1>
<section>First Content</section>
<h1>Second Step</h1>
<section>Second Content</section>
</div>
<script>
$("#steps").steps(
{
headerTag : "h1",
bodyTag : "section",
cssClass: "wizard"
}
);
</script>
</body>
此外,这也是一个基本的css文件,必须嵌入:
<script src="./javascripts/jquery.steps.js"></script>
这可以在项目的git集线器页面上找到。
https://stackoverflow.com/questions/30340302
复制相似问题