Skip to content

Commit

Permalink
Added in the new .noConflict() function for resolving conflict betwee…
Browse files Browse the repository at this point in the history
…n jQuery and other $ functions.
  • Loading branch information
jeresig committed Jan 4, 2007
1 parent 783f589 commit 04b51d3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/jquery/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04b51d3

Please sign in to comment.