The is a no-conlict method for jQuery is used so that the conflicts with other scripting tools are minimized. What happens with this is that you redefine the $ generally used for jQuery with some other term. This tells the browser that this is script for the jQuery file vs any other JavaScript file that may have been loaded. You should use the np-conflict method if your web page is using other scritping languages in addition to jQuery to avoid conflict with similar symbols and terms.

There are a number of ways to use .noConflict() to avoid problems.

Three dot cartouche

Replace $ with another term using .noConflict();

<!-- load jquery files -->
<script src="/js/jquery.js"></script>

<!-- load mootools -->
<script src=js/mootools0core.js"

<script>

// put jQuery into no-conflict mode
var $jq = jQuery.noConflict();

$jq(document).ready(function(){
    $jq("#introbox").delay(4000).hide();
});

</script>

In the example above, the script is replacing $ with $jq. Everytime you write code for jQuery functions, you need to start with $jq throughout the entire script.

This is only necessary if you have different varieties of JavaScript running.

Three dot cartouche

Write out jQuery(...) instead of $(...)

Once you have the $.noConflict; line inside the script, you can write out JQuery each time you need to use jQuery in place of the $

<script>
$.noConflict;  // envoke the no conflict method
jQuery(document).ready(function(){
    var newQuote = "To each his own";    
    $(".quotebox").html(newQuote);
});
</script>

Three dot cartouche

Pass the $ as a parameter for the .ready() method

There is a problem that arises when you have many many lines of code already written that uses the $. To edit this could be laborious and cause more problems. There is a way to avoid having to rewrite existing code by placing the $ inside the parentheses of function(). Doing this allows you to use the $ inside this function, but you will still have to spell out jQuery outside the function.

$.noConflict();
jQuery(document).ready(function($){  // pass the $ sign as a parameter
    $("#clickhere").click(function(){
        alert("All is fine");
    });
});