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

查看:26
本文介绍了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 并告诉它进入 No Conflict 模式 任何 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天全站免登陆