]> source.dussan.org Git - jquery.git/commitdiff
Added in the new .noConflict() function for resolving conflict between jQuery and...
authorJohn Resig <jeresig@gmail.com>
Thu, 4 Jan 2007 18:48:48 +0000 (18:48 +0000)
committerJohn Resig <jeresig@gmail.com>
Thu, 4 Jan 2007 18:48:48 +0000 (18:48 +0000)
src/jquery/jquery.js

index 5aa2130269b8cd9a3965a7d984257aba51a870d7..3d9e3042aae716d6f2842664c574f94f04171618 100644 (file)
@@ -1062,6 +1062,24 @@ jQuery.extend = jQuery.fn.extend = function() {
 };
 
 jQuery.extend({
+       /**
+        * Run this function to give control of the $ variable back
+        * to whichever library first implemented it. This helps to make 
+        * sure that jQuery doesn't conflict with the $ object
+        * of other libraries.
+        *
+        * By using this function, you will only be able to access jQuery
+        * using the 'jQuery' variable. For example, where you use to do
+        * $("div p"), you now must do jQuery("div p").
+        *
+        * @name noConflict
+        * @type undefined
+        * @cat Core 
+        */
+       noConflict: function(){
+               $ = jQuery._$;
+       },
+       
        /**
         * @private
         * @name init