2015-07-15 22:28:30 +00:00
|
|
|
/*!
|
2024-05-10 12:45:59 +00:00
|
|
|
* jQuery UI Legacy jQuery Core patches @VERSION
|
2024-04-26 14:25:34 +00:00
|
|
|
* https://jqueryui.com
|
2015-07-15 22:28:30 +00:00
|
|
|
*
|
2022-07-19 07:36:55 +00:00
|
|
|
* Copyright OpenJS Foundation and other contributors
|
2015-07-15 22:28:30 +00:00
|
|
|
* Released under the MIT license.
|
2024-04-26 14:25:34 +00:00
|
|
|
* https://jquery.org/license
|
2015-07-15 22:28:30 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2024-05-10 12:45:59 +00:00
|
|
|
//>>label: Legacy jQuery Core patches
|
2015-10-21 23:08:44 +00:00
|
|
|
//>>group: Core
|
2024-05-10 12:45:59 +00:00
|
|
|
//>>description: Backport `.even()`, `.odd()` and `$.escapeSelector` to older jQuery Core versions (deprecated)
|
2015-07-15 22:28:30 +00:00
|
|
|
|
|
|
|
( function( factory ) {
|
2021-06-06 22:58:12 +00:00
|
|
|
"use strict";
|
|
|
|
|
2015-07-15 22:28:30 +00:00
|
|
|
if ( typeof define === "function" && define.amd ) {
|
|
|
|
|
|
|
|
// AMD. Register as an anonymous module.
|
|
|
|
define( [ "jquery", "./version" ], factory );
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// Browser globals
|
|
|
|
factory( jQuery );
|
|
|
|
}
|
2021-06-06 22:58:12 +00:00
|
|
|
} )( function( $ ) {
|
|
|
|
"use strict";
|
2015-07-15 22:28:30 +00:00
|
|
|
|
2021-05-14 21:37:19 +00:00
|
|
|
// Support: jQuery 2.2.x or older.
|
|
|
|
// This method has been defined in jQuery 3.0.0.
|
|
|
|
// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
|
|
|
|
if ( !$.escapeSelector ) {
|
2024-05-10 12:45:59 +00:00
|
|
|
$.escapeSelector = function( id ) {
|
|
|
|
return CSS.escape( id + "" );
|
2021-05-14 21:37:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-01-22 15:44:34 +00:00
|
|
|
// Support: jQuery 3.4.x or older
|
|
|
|
// These methods have been defined in jQuery 3.5.0.
|
|
|
|
if ( !$.fn.even || !$.fn.odd ) {
|
|
|
|
$.fn.extend( {
|
|
|
|
even: function() {
|
|
|
|
return this.filter( function( i ) {
|
|
|
|
return i % 2 === 0;
|
|
|
|
} );
|
|
|
|
},
|
|
|
|
odd: function() {
|
|
|
|
return this.filter( function( i ) {
|
|
|
|
return i % 2 === 1;
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2021-06-06 22:58:12 +00:00
|
|
|
} );
|