Integrating Isotope js on Joomla 1.5 site

假如想象 提交于 2019-12-13 08:39:12

问题


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

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

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

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

Cannot read property 'isotope' of null

(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

(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)

Chris


回答1:


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).

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

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



来源:https://stackoverflow.com/questions/43962392/integrating-isotope-js-on-joomla-1-5-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!