【发布时间】:2018-08-16 19:13:55
【问题描述】:
我正在尝试学习 Laravel 5.5,当我尝试在我的模式窗口(引导程序)中添加 jquery datepicker 时,我再次陷入困境。由于一些未知的原因,总是有一个错误说:-
$("#last_renewal").datepicker() 不是函数
我已按以下方式在标题部分正确添加了所有必需的文件:-
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css" />
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="//use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
现在我真的很困惑我在做什么错误。除了 datepicker,jquery 中的一切都可以正常工作。
请推荐
【问题讨论】:
-
添加 js 代码以获取更多详细信息您是否在 $(document).ready() 中编写代码?
-
@Jigs1212 不工作。我得到的最多的是......我的 区域链接中有一些问题。因为如果我删除这些链接,那么它就可以正常工作。但仍然无法得到导致错误的原因
-
哪些链接可以用当前头更新问题?
-
你也可以发布 HTML 吗?当您似乎正在使用 Bootstrap 3 时,为什么这会被标记为 [bootstrap-4]?
-
我创建了fiddle,你的代码仍然有效
标签: jquery laravel jquery-ui laravel-5.5