Robin
Robin

Reputation: 23

JQuery conflict in Joomla 1.5 site

I'm having some sort of a conflict with JQuery. I'm developing the site in Joomla, which appears to be complicating this issue a little more. Site is at http://www.deepwaterchurch.com/cms

I had an earlier issue whereby the slider I was using (utilizing JQuery) was conflicting with Mootools. I was able to install a plugin via Joomla that enabled JQuery in no-conflict mode (in the head); problem solved. Fast forward... I have added a JQuery script in the body of my document to parse an XML file (podcast), but now my slider won't work any more! If I delete line 366...

<script src="/cms/scripts/jquery.js" type="text/javascript"></script>

...then the slider works fine, but my XML-generated podcast doesn't work. I've tried various iterations to enable NoConflict in the body, but it doesn't seem to work.

I'll be the first to admit that I'm kind of hacking my way through and learning as I go. Can anyone offer any insight? Thanks!

Upvotes: 0

Views: 1916

Answers (2)

Pramendra Gupta
Pramendra Gupta

Reputation: 14873

jquery uses mootools which create conflict

 var $j = jQuery.noConflict();

     // Use jQuery via $j(...)
     $j(document).ready(function(){
       $j("div").hide();
     });

Upvotes: 0

Ben
Ben

Reputation: 1535

Underneath that line you have mentioned you are referencing jQuery again using $. If you remove the line you have mentioned which is not needed since you have included jQuery already in the part of your document. Then change all instances of $ to jQuery. For example change

$(function() {
    //code
});

to this

jQuery(function() {
    //some code
});

Upvotes: 2

Related Questions