我得到一个错误,我jQuery的功能之一都没法:我jquery.timepicker.js
在供应商/资产/ JavaScript的,使用对象的翻译:具有使用Rails和jQuery资产管道
Uncaught TypeError: Object [object Object] has no method 'timepicker'
在我应用程序/资产/ Java脚本/ application.js中我有这个
//= require jquery.timepicker
引入jquery文件的
。我甚至可以看到它使用chrome浏览器加载到我的检测元素中。
在我的其他文件,其中我写的功能,我有这个
jQuery ->
$(".time_avail").timepicker ->
这给了我这个在浏览器:
(function() {
jQuery(function() {
return $(".time_avail").timepicker(function() {});
});
}).call(this);
我的视图文件确实有输入栏class
<input class="time_avail time-picker" id="hour_open_time" name="hour[open_time]" size="30" type="text" />
我该做什么错,值得这个错误?
检查浏览器开发人员工具网络选项卡,查看是否下载/包含了timepicker库 –
尝试在Firebug中控制$ .fn.datepicker()。希望你能得到的功能 – Adrian
@ArunPJohny我检查了网络标签,它出现在列表中。 – hellomello