Forums

Conflict with DJ Image Slider

jmtmay 06 Apr, 2012
It seems there is a conflict between Chrono Forms and DJ Image Slider. I added a newsletter signup form to my homepage and now my image slider isn't working any more.

Any ideas on how to correct this? Here's my homepage link: http://vps7253.inmotionhosting.com/~visitfol/

Thanks so much!
jmtmay 07 Apr, 2012
I've gotten rid of that error and added the jQuery.noconflict, but now I'm getting this error:

Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function

I believe it is in this line of the Chronoforms code: $('chronoform_newslettersignup').addClass('hasValidation');

I'm not that familiar with Javascript, so I'm not sure what to do. Any suggestions?

Thanks!
GreyHead 10 Apr, 2012
Hi jmtmay,

If you aren't familiar with JavaScript then it's best not to use JQuery on Joomla! sites. It is often poorly implemeted and breaks other code.

Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest - which may or may not work - is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat plugin named JB Library from Joomla! Bamboo that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However this requires that JQuery is loaded using the Joomla Document object methods.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
This topic is locked and no more replies can be posted.