【问题标题】:elfinder module throws jquery error in drupal 7elfinder 模块在 drupal 7 中引发 jquery 错误
【发布时间】:2017-03-27 08:07:43
【问题描述】:

我在 drupal 7 中安装了 elfinder 模块,但是当我们加载 elfinder 页面时它会抛出 jQuery 错误,但文件处理功能很好。 elfinder 中的图标也未正确对齐。

Click here for elfinder icons issue

TypeError: $(...).once 不是函数
$('.colorbox', 上下文)

提前致谢。

【问题讨论】:

    标签: jquery drupal drupal-7 elfinder


    【解决方案1】:

    你必须定义 $

       (function($){
           $(document).ready(function(){
              var context = $('body'); // or what you want
              $('.colorbox', context).dowhatyouwant();
           });
        })(jQuery.noConflict());
    

    【讨论】:

    • 我尝试了以下代码,但仍然无法正常工作。还有为什么图标是错位的? i.stack.imgur.com/pJ7CT.png (function($){ $(document).ready(function(){ $('.colorbox', context) .once('init-colorbox') .colorbox(settings.colorbox); }); } )(jQuery.noConflict());
    • 感谢您的帮助。但我无法解决这个问题。你能给我更新一下位于 colorbox 模块中的 colorbox.js 吗?
    • 验证图标的路径和图标的物理存在
    • 好的。我刚刚通过 elfinder-mi.css 的更改修复了图标未对齐的问题。你能给我更新一下位于 colorbox 模块中的 colorbox.js 吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多