mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fixed the docs for noConflict, fixed a bug with pager.
This commit is contained in:
14
src/jquery/jquery.js
vendored
14
src/jquery/jquery.js
vendored
@@ -1130,28 +1130,32 @@ jQuery.extend({
|
||||
* sure that jQuery doesn't conflict with the $ object
|
||||
* of other libraries.
|
||||
*
|
||||
* By using this function, you will only be able to access jQuery
|
||||
* By using this function, you will only be able to access jQuery
|
||||
* using the 'jQuery' variable. For example, where you used to do
|
||||
* $("div p"), you now must do jQuery("div p").
|
||||
*
|
||||
* @example jQuery.noConflict();
|
||||
* // Do something with jQuery
|
||||
* jQuery("div p").hide();
|
||||
*
|
||||
* // Do something with another library's $()
|
||||
* $("content").style.display = 'none';
|
||||
* @desc Maps the original object that was referenced by $ back to $
|
||||
*
|
||||
* @example jQuery.noConflict();
|
||||
* (function($) {
|
||||
* $(function() {
|
||||
* $(function() {
|
||||
* // more code using $ as alias to jQuery
|
||||
* });
|
||||
* })(jQuery);
|
||||
* // other code using $ as an alias to the other library
|
||||
* @desc Reverts the $ alias and then creates and executes a
|
||||
* function to provide the $ as a jQuery alias inside the functions
|
||||
* scope. Inside the function the original $ object is not available.
|
||||
* scope. Inside the function the original $ object is not available.
|
||||
* This works well for most plugins that don't rely on any other library.
|
||||
*
|
||||
*
|
||||
* @name $.noConflict
|
||||
* @type undefined
|
||||
* @type undefined
|
||||
* @cat Core
|
||||
*/
|
||||
noConflict: function() {
|
||||
|
||||
Reference in New Issue
Block a user