Jquery Steps什么都不做

Jquery Steps doing nothing

本文关键字:什么 Steps Jquery      更新时间:2023-09-26

我正在尝试使用Jquery-Steps,但这甚至不像工作或加载,它只显示h1和div块,只有html被加载

这是我从他们那里获取的代码,我不知道我是否需要做其他事情。

<html>
<head>
    <title>Demo</title>
    <meta charset="utf-8">
    <script type='text/javascript'  src="jquery.js"></script> 
    <script type='text/javascript' src="jquery.steps.js"></script>
    <script type='text/javascript'  src="jquery.steps.min.js"></script>
</head>
<body>
    <script>
        $("#wizard").steps();
    </script>
    <div id="wizard">
<h1>First Step</h1>
<div>First Content</div>
<h1>Second Step</h1>
<div>Second Content</div>
</div>
</body>
</html>

现在试试?

<html>
<head>
    <title>Demo</title>
    <meta charset="utf-8">
    <script type='text/javascript' src="https://code.jquery.com/jquery-2.2.0.min.js"></script> 
    <script type='text/javascript' src="jquery.steps.min.js"></script>
</head>
<body>
        <script>
            $("#wizard").steps();
        </script>
        <div id="wizard">
    <h1>First Step</h1>
    <div>First Content</div>
 
    <h1>Second Step</h1>
    <div>Second Content</div>
</div>
   <script>
    // Initialize wizard
var wizard = $("#wizard").steps();
 
// Add step
wizard.steps("add", {
    title: "HTML code", 
    content: "<strong>HTML code</strong>"
});
    </script>
    </body>
</html>