未捕获的TypeError:$(...).steps不是函数

编程入门 行业动态 更新时间:2024-10-27 15:22:54
本文介绍了未捕获的TypeError:$(...).steps不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我在引导程序模板中看到了非常漂亮的表单,我想在我的项目中使用它们.

So I saw really good looking forms in my bootstrap template and I wanted to use them in my project.

我将所有我认为需要导入的必需文件放置在代码的底部,这些必需文件位于正确的目录中,例如jquery步骤: C:\ xampp \ htdocs \rps \ public \ files \ bower_components \ jquery.steps \ js \ jquery.steps.js

I placed all the required files that I think we need to import which are added at the bottom of the code, required files are in the correct directories, for example, jquery steps: C:\xampp\htdocs\rps\public\files\bower_components\jquery.steps\js\jquery.steps.js

'initialize-steps.js':

'initialize-steps.js':

$("#practitioner-form").steps({ headerTag: "h3", bodyTag: "fieldset", transitionEffect: "slideLeft", enablePagination: true, autoFocus: true, onFinished: function (event, currentIndex) { alert("Practitioner Added!"); } });

我的具有多种格式(...)的HTML文件被跳过了一部分:

My HTML file with multiform (...) is skipped part:

<div class="card-block"> <div class="row"> <div class="col-md-12"> <div id="practitioner-form"> <form method="post" id="practitioner-form" action="#"> <h3>Practitioner</h3> <fieldset> <legend>Practitioner Information</legend> <div class="form-group row"> <div class="col-lg-12"> <label for="effective_date" class="block">{{trans('personalData.effectiveDate')}}</label> </div> <div class="col-lg-12"> <input id="effective_date" name="effectiveDate" type="date" class="form-control required"> </div> </div> (...) <link rel="stylesheet" type="text/css" href="/files/bower_components/jquery.steps/css/jquery.steps.css"> <!-- Required Jquery --> <script src="/files/js/views/person/initialize-steps.js"></script> <script src="/files/bower_components/jquery/js/jquery.min.js"></script> <script src="/files/bower_components/jquery-ui/js/jquery-ui.min.js"></script> <script src="/files/bower_components/popper.js/js/popper.min.js"></script> <script src="/files/bower_components/bootstrap/js/bootstrap.min.js"></script> <!--Forms - Wizard js--> <script src="/files/bower_components/jquery.cookie/js/jquery.cookie.js"></script> <script src="/files/bower_components/jquery.steps/js/jquery.steps.js"></script> <script src="/files/bower_components/jquery-validation/js/jquery.validate.js"></script> <script src="/files/js/modules/practitionerCompetence.js"></script>

在尝试加载页面时仍然出现错误:未捕获的TypeError:$(...).steps不是函数任何人都知道如何修复它?

Still when I try to load up the page I get an error: Uncaught TypeError: $(...).steps is not a function Anyone knows how to fix it?

推荐答案

jquery.steps.js 在 initialize-steps.js

<script src="/files/js/views/person/initialize-steps.js"></script> .... <script src="/files/bower_components/jquery.steps/js/jquery.steps.js"></script>

您需要在之后加载 initialize-steps.js

You need to load initialize-steps.js after it

<script src="/files/bower_components/jquery.steps/js/jquery.steps.js"></script> <script src="/files/js/views/person/initialize-steps.js"></script> ....

更多推荐

未捕获的TypeError:$(...).steps不是函数

本文发布于:2023-11-23 03:47:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619975.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   TypeError   steps

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!