I am using the code MooTools (1.11) and jQuery (1.2.6). It's working fine when these are separate. While I am integrating Firefox, it throws:
(document).ready(){} is not a function.
Is anything wrong in my concept? What do I do to rectify it?
I am using the code MooTools (1.11) and jQuery (1.2.6). It's working fine when these are separate. While I am integrating Firefox, it throws:
(document).ready(){} is not a function.
Is anything wrong in my concept? What do I do to rectify it?
However, that said, I would suggest you ditch the MooTools.
Its complete modification of all object prototypes can cause cause jQuery's functions to randomly and unexplainable cause errors, and on top of that, MooTools' modification of all object prototypes (the Object and Function prototypes are even modified), have, in my experience, resulted in jQuery performing significantly slower than without, simply for MooTools being on the same page.
Additionally, MooTools is 50 KB and jQuery is 25 KB (average numbers, including extensions). Having them both will drastically slow down page load just for the extra data fetch.
A project I was working was having problems with JavaScript performance, and I'm talking really serious slowdowns, in seemingly simple code. We migrated to jQuery, and there was no performance gain until we stopped loading the MooTools when we'd finished migrating the code, and then as soon as we dropped MooTools, the speed came back.
MooTools for jQuery: http://moo4q.com/
jQuery <3 the DOM jQuery is awesome but it's scope is (generally) DOM [manipulation]
MooTools <3 Objects MooTools make working with [javascript] objects huckleberry pie.
jQuery and MooTools both use '$' as a shorthand way of calling their main functions. The jQuery team have built in a way to stop this, so you can write something like:
Instead of
This will let you use jQuery and any other JavaScript library side by side. Read their docuentation on the subject - Using jQuery with Other Libraries.
You can also see the use of .noConlict method of jQuery. I don't know if it'll be usefull in your case...
In addition to sanchothefat said, you really should try to avoid using two such frameworks together because they essentially do the same thing. If you're not gzipping your Javascript, you're probably sending the user at least 150-200k of JavaScript with just the libraries, nevermind the plugins you're using. Almost anything you do in MooTools can be done in jQuery and vice versa. If you look around, you can probably find scripts that do what you're looking for that have been ported both ways.