我正在尝试将引导-数据采集插件添加到一个基于Drupal定制模块的页面中。我的问题是下面的函数不会给出任何错误,但是数据报警器永远不会出现。
jQuery(document).ready(function () {
jQuery('#datepicker1').datepicker({
format: 'mm-dd-yyyy'
});
});我使用info文件添加了引导-datepicker.js和datepicker.css。
stylesheets[all][] = stylesheets/datepicker.css
scripts[] = js/bootstrap-datepicker.js
scripts[] = js/filterBlock.js我是不是遗漏了什么?
发布于 2014-02-26 22:00:11
我不得不再次将jQuery.js添加到模块信息文件中,即使我已经启用了jQuery更新插件。但现在起作用了。
scripts[] = js/jquery-1.7.1.min.js
scripts[] = js/bootstrap-datepicker.js
stylesheets[all][] = stylesheets/style.css
stylesheets[all][] = stylesheets/datepicker.css有没有更好的解决办法?有人知道我为什么要再添加一次jQuery.js吗?当我像jQuery一样添加这个this.If时,我还会遇到一些其他问题,比如面板,如果没有引导数据报警器的jQuery,有人就能猜到缺少了什么,那就太好了。
发布于 2014-02-25 19:57:06
我不熟悉drupal,但最近我在一个Struts2项目上使用了引导程序。尽管我使用了引导程序,但最终使用的是jQueryUI数据报警器(http://jqueryui.com/datepicker/),它不仅工作得很好,而且还提供了将其修改为a (http://trentrichardson.com/examples/timepicker/TimePicker)的可能性。
https://stackoverflow.com/questions/22024276
复制相似问题