Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

90 righe
2.1 KiB

  1. /*!
  2. * jQuery UI Support for jQuery core 1.8.x and newer 1.13.1
  3. * http://jqueryui.com
  4. *
  5. * Copyright jQuery Foundation and other contributors
  6. * Released under the MIT license.
  7. * http://jquery.org/license
  8. *
  9. */
  10. //>>label: jQuery 1.8+ Support
  11. //>>group: Core
  12. //>>description: Support version 1.8.x and newer of jQuery core
  13. ( function( factory ) {
  14. "use strict";
  15. if ( typeof define === "function" && define.amd ) {
  16. // AMD. Register as an anonymous module.
  17. define( [ "jquery", "./version" ], factory );
  18. } else {
  19. // Browser globals
  20. factory( jQuery );
  21. }
  22. } )( function( $ ) {
  23. "use strict";
  24. // Support: jQuery 1.9.x or older
  25. // $.expr[ ":" ] is deprecated.
  26. if ( !$.expr.pseudos ) {
  27. $.expr.pseudos = $.expr[ ":" ];
  28. }
  29. // Support: jQuery 1.11.x or older
  30. // $.unique has been renamed to $.uniqueSort
  31. if ( !$.uniqueSort ) {
  32. $.uniqueSort = $.unique;
  33. }
  34. // Support: jQuery 2.2.x or older.
  35. // This method has been defined in jQuery 3.0.0.
  36. // Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
  37. if ( !$.escapeSelector ) {
  38. // CSS string/identifier serialization
  39. // https://drafts.csswg.org/cssom/#common-serializing-idioms
  40. var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
  41. var fcssescape = function( ch, asCodePoint ) {
  42. if ( asCodePoint ) {
  43. // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
  44. if ( ch === "\0" ) {
  45. return "\uFFFD";
  46. }
  47. // Control characters and (dependent upon position) numbers get escaped as code points
  48. return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
  49. }
  50. // Other potentially-special ASCII characters get backslash-escaped
  51. return "\\" + ch;
  52. };
  53. $.escapeSelector = function( sel ) {
  54. return ( sel + "" ).replace( rcssescape, fcssescape );
  55. };
  56. }
  57. // Support: jQuery 3.4.x or older
  58. // These methods have been defined in jQuery 3.5.0.
  59. if ( !$.fn.even || !$.fn.odd ) {
  60. $.fn.extend( {
  61. even: function() {
  62. return this.filter( function( i ) {
  63. return i % 2 === 0;
  64. } );
  65. },
  66. odd: function() {
  67. return this.filter( function( i ) {
  68. return i % 2 === 1;
  69. } );
  70. }
  71. } );
  72. }
  73. } );