Joomla,jQuery模块冲突 [英] Joomla, jQuery modules conflicting

查看:62
本文介绍了Joomla,jQuery模块冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上的模块中有一个自定义jQuery手风琴菜单,启用该功能后,它会破坏我的RokSlideshow模块.

I have a custom jQuery accordion menu on my site in a module, when the mod is enabled it breaks my RokSlideshow module.

我不能让他们两个都同时工作.

I can't get them both to work at the same time.

该网站为 http://www.fbcsheffield.org/2.0

任何帮助将不胜感激!

推荐答案

您必须先强制​​MooTools加载,然后加载jQuery,并告诉它进入任何jQuery代码之前 的无冲突模式,或者插件被执行.请查看第183页: http://www.packtpub.com/files/learning-joomla-1-5-extension-development-sample-chapter-8-using-javascript-effects.pdf 或此线程在Joomla论坛上: http://forum.joomla.org/viewtopic .php?f = 231& t = 283215

You have to force MooTools to load first, then load jQuery and tell it to go into No Conflict mode before any jQuery code or plugins are executed. Check page 183 of this: http://www.packtpub.com/files/learning-joomla-1-5-extension-development-sample-chapter-8-using-javascript-effects.pdf or this thread on the Joomla forum: http://forum.joomla.org/viewtopic.php?f=231&t=283215

实际上,您不必先加载MooTools,只需确保在加载jQuery后立即立即调用jQuery.noConflict(): http://www.designvsdevelop.com/jquery-in-joomla-我错了

you actually don't have to load MooTools first, you just have to make sure that jQuery.noConflict() is called immediately after jQuery is loaded: http://www.designvsdevelop.com/jquery-in-joomla-i-was-wrong

这篇关于Joomla,jQuery模块冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆