所以我在引导程序模板中看到了非常漂亮的表单,我想在我的项目中使用它们.
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不是函数
发布评论