dongqiao5573 2014-03-28 12:18
浏览 60

在Joomla 2.5中禁用JS脚本

I'm using Joomla 2.5.19 and I have removed Mootools since it is generating a conflict with JQuery. I've also disabled caption.js.

Now, on every page, the following script is being added in the head section:

<script type="text/javascript">
window.addEvent('domready', function() {
            $$('.hasTip').each(function(el) {
                var title = el.get('title');
                if (title) {
                    var parts = title.split('::', 2);
                    el.store('tip:title', parts[0]);
                    el.store('tip:text', parts[1]);
                }
            });
            var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false});
        });
  </script>

This is throwing the error:

Uncaught TypeError: Object [object global] has no method 'addEvent' 

How do I get rid of this?

I followed the instructions here and deleted:

JHtml::_('behavior.caption');

From components/com_content/controller.php

But no luck. I also tried including unset($this->_scripts['/media/system/js/caption.js']);

How do I get rid of this?

  • 写回答

3条回答 默认 最新

  • dtz46697 2014-03-28 13:28
    关注

    You should not remove Mootools, for conflictions, you can use jQuery Easy plugin. Visit http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/18327

    评论

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)