jquery no conflict mode

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
frobak
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jun 13, 2010 4:55 pm
Contact:

jquery no conflict mode

Postby frobak » Sun Jun 13, 2010 5:03 pm

Hi

Im trying to use the chronoforms plugin but apparently there is a jquery conflict with mootools and i need to run jquery in no conflict mode.

Is there a tutorial or can smeone explain in plain english how to acheive this.

I know nothing about jquery at all!

thanks in advance
http://www.enetdesign.co.uk - professional website design & developmen

User avatar
float-right
Joomla! Explorer
Joomla! Explorer
Posts: 496
Joined: Wed Jun 02, 2010 12:16 pm
Contact:

Re: jquery no conflict mode

Postby float-right » Tue Jun 15, 2010 9:23 am

If it is chronoforms that is loading jQuery, then it is probably best to speak with the developer.

That way everyone will get the benefit of the fix.

I suspect that you issue lies solely with jQuery though and that you have another extension also loading jQuery, without using noconflict.

If the site is live, and you post a url, I might be able to tell you where the problem lies...
Top-tip: marking your posts as "Urgent!", when they clearly aren't, will most likely get you ignored.

Please don't PM me with anything other than *Personal Messages*! If you have a Joomla question, post it in the forum.

miennh
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Fri Jun 18, 2010 4:02 am

Re: jquery no conflict mode

Postby miennh » Fri Jun 18, 2010 5:25 am

Hj frobak,
Jquery no conflict with mootools, you can choose 1 in 2 solution.
#1. declare jQuey.noConflict; before using jquery
#2. declare jQuery = jQuery.noConflict(); and using "$" of jquery by "jQuery"
for example: jQuery('#content').innerHTML = '';

User avatar
shibu
Joomla! Guru
Joomla! Guru
Posts: 681
Joined: Fri Oct 24, 2008 5:35 am
Location: Openkey Technologies, India
Contact:

Re: jquery no conflict mode

Postby shibu » Fri Jun 18, 2010 5:28 am

Jquery no conflict with mootools, you can choose 1 in 2 solution.
#1. declare jQuey.noConflict; before using jquery
#2. declare jQuery = jQuery.noConflict(); and using "$" of jquery by "jQuery"
for example: jQuery('#content').innerHTML = '';


This should be work.

Thanks
Shibu
http://www.openkeytech.com/ - Joomla Extension Development

User avatar
float-right
Joomla! Explorer
Joomla! Explorer
Posts: 496
Joined: Wed Jun 02, 2010 12:16 pm
Contact:

Re: jquery no conflict mode

Postby float-right » Sun Jun 20, 2010 2:22 pm

shibu wrote:
Jquery no conflict with mootools, you can choose 1 in 2 solution.
#1. declare jQuey.noConflict; before using jquery
#2. declare jQuery = jQuery.noConflict(); and using "$" of jquery by "jQuery"
for example: jQuery('#content').innerHTML = '';


This should be work.

Thanks
Shibu


Yes, but it won't fix the extension for all the other users. Better to push the fix upstream for the benefit of all. Extensions loading jQuery should be using no-conflict mode.
Top-tip: marking your posts as "Urgent!", when they clearly aren't, will most likely get you ignored.

Please don't PM me with anything other than *Personal Messages*! If you have a Joomla question, post it in the forum.

User avatar
jeffchannell
Joomla! Ace
Joomla! Ace
Posts: 1964
Joined: Tue Jun 09, 2009 2:21 am
Location: WV
Contact:

Re: jquery no conflict mode

Postby jeffchannell » Sun Jun 20, 2010 8:36 pm

miennh wrote:Hj frobak,
Jquery no conflict with mootools, you can choose 1 in 2 solution.
#1. declare jQuey.noConflict; before using jquery
#2. declare jQuery = jQuery.noConflict(); and using "$" of jquery by "jQuery"
for example: jQuery('#content').innerHTML = '';


You don't actually HAVE to use jQuery() instead of $() in no conflict mode: instead use something like this:

Code: Select all

(function($){
   $(document).ready(function(){
      ...
   });
})(jQuery);


If you wrap your code in a function using $ as the sole parameter, and execute it by passing jQuery as the parameter, you can use $() all you want in your jQuery code without having issues (as using $ in this manner stays solely within the scope of your anonymous function).
http://jeffchannell.com - Joomla Extensions & Support
http://biziant.com - Open Joomla Firewall/IDS
Unsolicited private messages/emails = hire me to fix your problem.
καλλιστι


Return to “General Questions/New to Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 14 guests