mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fixed the docs for noConflict, fixed a bug with pager.
This commit is contained in:
parent
ab0287681f
commit
458d427c0e
@ -68,7 +68,9 @@ $.fn.pager = function(step) {
|
|||||||
pager = $("<ul class='nav-page'></ul>");
|
pager = $("<ul class='nav-page'></ul>");
|
||||||
|
|
||||||
for ( var i = 0; i < names.length; i++ )
|
for ( var i = 0; i < names.length; i++ )
|
||||||
$("<a href=''></a>").rel( i ).html( names[i] ).click(function() {
|
$("<a href=''></a>").attr({
|
||||||
|
rel: i, innerHTML: names[i]
|
||||||
|
}).click(function() {
|
||||||
return handleCrop( this.rel );
|
return handleCrop( this.rel );
|
||||||
}).wrap("<li></li>").parent().appendTo(pager);
|
}).wrap("<li></li>").parent().appendTo(pager);
|
||||||
|
|
||||||
|
12
src/jquery/jquery.js
vendored
12
src/jquery/jquery.js
vendored
@ -1130,23 +1130,27 @@ jQuery.extend({
|
|||||||
* using the 'jQuery' variable. For example, where you used to do
|
* using the 'jQuery' variable. For example, where you used to do
|
||||||
* $("div p"), you now must do jQuery("div p").
|
* $("div p"), you now must do jQuery("div p").
|
||||||
*
|
*
|
||||||
* @example $.noConflict();
|
* @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 $
|
* @desc Maps the original object that was referenced by $ back to $
|
||||||
*
|
*
|
||||||
* @example $.noConflict();
|
* @example jQuery.noConflict();
|
||||||
* (function($) {
|
* (function($) {
|
||||||
* $(function() {
|
* $(function() {
|
||||||
* // more code using $ as alias to jQuery
|
* // more code using $ as alias to jQuery
|
||||||
* });
|
* });
|
||||||
* })(jQuery);
|
* })(jQuery);
|
||||||
* // other code using $ as an alias to the original implementation (not jQuery)
|
* // other code using $ as an alias to the other library
|
||||||
* @desc Reverts the $ alias and then creates and executes a
|
* @desc Reverts the $ alias and then creates and executes a
|
||||||
* function to provide the $ as a jQuery alias inside the functions
|
* 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.
|
* This works well for most plugins that don't rely on any other library.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @name noConflict
|
* @name $.noConflict
|
||||||
* @type undefined
|
* @type undefined
|
||||||
* @cat Core
|
* @cat Core
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user