[Moo] Mootools and JQuery dont play nice....

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Moo] Mootools and JQuery dont play nice....

charles mayes
Hello all,

I have a small issue, MooTools and JQuery dont seem to play well together... Does anyone know of any workaround's or fixes?

We are trying to use the mootools Accordion feateure with BPopUp code, and BPopUp always prevails when we place both on the same site.

THANKS!!

~The Lorewiki Admin Team

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Mootools and JQuery dont play nice....

Sanford Whiteman
It's likely (though not certain) that they are both attempting to use the $ macro, so try

    jQuery.noConflict();

after jQ and before loading Moo.

-- S.

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: Mootools and JQuery dont play nice....

Jack Drysdale Jr
In reply to this post by charles mayes
You should never use two libraries together.  You won't ALWAYS have issues, like this, but the chances are high that you will.  Usually due to conflicting variables.

Best suggestion that I can make (and I know you don't want to hear it) is to pick one of the libraries and stick with it, forsaking all other JS libraries.

If you absolutely must have a particular feature of one library that isn't native to the other, look around for plug-ins.. someone might have done the work, already.  That's one of the things that I love about JavaScript - an open community.

Best of luck,

JD

On Sunday, September 1, 2013 5:59:16 PM UTC-5, charles mayes wrote:
Hello all,

I have a small issue, MooTools and JQuery dont seem to play well together... Does anyone know of any workaround's or fixes?

We are trying to use the mootools Accordion feateure with BPopUp code, and BPopUp always prevails when we place both on the same site.

THANKS!!

~The Lorewiki Admin Team

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Mootools and JQuery dont play nice....

patel.nachiket.r@gmail.com
In reply to this post by charles mayes
I have been using Jquery and Mootools together for couple of fairly large projects, and I never faced any major issues. 

Please keep following in mind.

1. use jquery.noConflict();
2. check the code which has problem, see which $ instance it is, mootools or jquery, if jquery plugin is old, then it might be using $ directly, in such case make sure that $ is jquery, by encapsulating in function($) {}

in rare cases, there are some issues, I remember there was some conflicts with jquery UI dropdown, i had to change couple of lines in jQuery UI. 

Regards,
Nachiket Patel
http://www.jumpbyte.com


On 2 September 2013 04:29, charles mayes <[hidden email]> wrote:
Hello all,

I have a small issue, MooTools and JQuery dont seem to play well together... Does anyone know of any workaround's or fixes?

We are trying to use the mootools Accordion feateure with BPopUp code, and BPopUp always prevails when we place both on the same site.

THANKS!!

~The Lorewiki Admin Team

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: Mootools and JQuery dont play nice....

Sanford Whiteman
In reply to this post by Jack Drysdale Jr
> You should never use two libraries together.  You won't ALWAYS have
> issues, like this, but the chances are high that you will.  Usually due to conflicting variables.

IME, the chances are more "intermediate" than high.

jQuery.noConflict(), using document.id in place of Moo's $(), and
using the latest versions of both takes care of the lion's share of
issues.

True, it can be risky to use multiple frameworks, but it's not a
"never" situation. Many ultra-contemporary sites use multiple
microframeworks that have explicitly overlapping helper functions (in
terms of purpose, not name). You just make sure to tell your "_" from
your "$".

You are more likely to have conflicts between newer JS engines and
frameworks than between frameworks.

-- S.

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.