Javascript framework conflicts

Personally I primarily use JQuery as my javascript framework of choice, for everything. But on occasion there can be a need to use another framework on the same page as jQuery. Other frameworks include Prototype, Moo-tools and  YUI. These frameworks may have a unique or exclusive function or plugin that a client has requested, and which can’t be replicated in jQuery.

Using two different frameworks on the same page can cause conflicts and errors mainly because of jQuery’s use of the ($)dollar symbol as a shortcut for “jQuery”. However, the jQuery library has a solution for this in the form of the jquery.noconflict() function. Adding this function at any point after the jQuery and other library has loaded,  will revert  ($) back to its original library.

Another technique is to add the document.ready() function inside a ghost function first: 

And the last method is to assign assign jQuery to any other variable name to use it as your shorthand , as oppose to the ($) symbol. E.g  var j = jQuery;