如何在drupal 7中集成这个js?

时间:2013-06-19 18:53:50

标签: javascript jquery ajax drupal

此风以下插件强行下载

jquery.fileDownload.js

我想整合drupal 7

并输入theme.info jquery.fileDownload.js

dwnload-force.js除了包含以下代码:

(function ($) {
Drupal.behaviors.MyfunctionTheme = {
attach: function(context, settings) {
$(document).on("click", "b.fileDownloadSimpleRichExperience", function () {
$.fileDownload($(this).prop('href'), {
preparingMessageHtml: "Se esta preparando su descarga, por favor espere un momento...",
failMessageHtml: "Hubo un problema al generar su descarga, porfavor intente de nuevo."
});
return false; //this is critical to stop the click event which will trigger a normal file download!
});
}}
})( jQuery );
firebug向我展示了以下内容:

TypeError: $(...).on is not a function  

$(document).on("click", "b.fileDownloadSimpleRichExperience", function () {

比你

0 个答案:

没有答案