在Joomla 1.5站点上集成同位素js [英] Integrating Isotope js on Joomla 1.5 site

查看:74
本文介绍了在Joomla 1.5站点上集成同位素js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Joomla 1.5站点上集成Isotope JS. (我知道它是旧的Joomla!)

I am trying to integrate Isotope JS on Joomla 1.5 site. (I know it's old Joomla!)

https://www.buffalobrownies.com/?view=article&id = 269

我在该域(但不在Joomla之外)的测试页上正常运行了代码.

I got the code working fine on a test page on that domain (but outside of Joomla).

在Joomla内部,JQuery和普通JS似乎都不会触发.

Inside Joomla, neither the JQuery nor vanilla JS seems to trigger.

启用JQuery触发代码后,我在Chrome控制台上收到此错误:

With JQuery trigger code on, I get this error on Chrome Console:

无法读取null的属性同位素"

(打开香草JS脚本后,我会收到很多其他错误……)

(With the vanilla JS script turned on I get a bunch of OTHER errors......)

所以我猜对$的引用有问题,但是我对它的了解不足以了解它是什么...

So I'm guessing there is something wrong with the reference to $ but I'm not clued up enough to know what it is...

有什么想法吗?谢谢您的帮助

Any thoughts out there? Thanks for your help

(我在<head>中将Jquery链接到较高的位置,然后紧随其后的是Isotope JS链接,然后在底部的</body>标记之前,同位素触发JS)

(I have Jquery linked high up in the <head>, then Isotope JS link just after, then the isotope trigger JS before the bottom </body> tag)

克里斯

推荐答案

所以我发现是Joomla 1.5中的Mootools引起了冲突. (我只需要开始一行一行地取出代码,直到找到最重要的那一行为止.)

So I discovered that it was Mootools in Joomla 1.5 that was causing the conflict. (I just had to start taking lines of code out, one by one, until I found the one that made the difference).

我设法在网上找到了一些代码,这些代码关闭了Mootools的前端功能,但保留了后端的功能.

I managed to find some code online that turned Mootools off for the front end, but kept it on for the back end.

现在,在示例中,我设法使Isotope脚本正常工作.现在,我只需要使它与实时数据一起使用即可!

Now I've managed to get the Isotope script working in my example. Now I just need to get it working with live data!

这篇关于在Joomla 1.5站点上集成同位素js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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