The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: jquery no conflict mode
PostPosted: Sun Jun 13, 2010 5:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jun 13, 2010 4:55 pm
Posts: 3
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


Top
 Profile  
 
PostPosted: Tue Jun 15, 2010 9:23 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed Jun 02, 2010 12:16 pm
Posts: 496
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.


Top
 Profile  
 
PostPosted: Fri Jun 18, 2010 5:25 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 18, 2010 4:02 am
Posts: 16
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 = '';


Top
 Profile  
 
PostPosted: Fri Jun 18, 2010 5:28 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Oct 24, 2008 5:35 am
Posts: 671
Location: Adodis Technology Pvt Ltd, Bangalore
Quote:
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.outsource-website-design.com/ - Outsource Your Website Design and Development
http://www.ecommerce-web-developers.com/ - ECommerce Web Development


Top
 Profile  
 
PostPosted: Sun Jun 20, 2010 2:22 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed Jun 02, 2010 12:16 pm
Posts: 496
shibu wrote:
Quote:
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.


Top
 Profile  
 
PostPosted: Sun Jun 20, 2010 8:36 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jun 09, 2009 2:21 am
Posts: 1964
Location: WV
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:
(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.
καλλιστι


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 



Who is online

Users browsing this forum: Epeks_92 and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group