Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

53 Zeilen
976 B

  1. /*!
  2. * jQuery UI Unique ID 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. //>>label: uniqueId
  10. //>>group: Core
  11. //>>description: Functions to generate and remove uniqueId's
  12. //>>docs: http://api.jqueryui.com/uniqueId/
  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. return $.fn.extend( {
  25. uniqueId: ( function() {
  26. var uuid = 0;
  27. return function() {
  28. return this.each( function() {
  29. if ( !this.id ) {
  30. this.id = "ui-id-" + ( ++uuid );
  31. }
  32. } );
  33. };
  34. } )(),
  35. removeUniqueId: function() {
  36. return this.each( function() {
  37. if ( /^ui-id-\d+$/.test( this.id ) ) {
  38. $( this ).removeAttr( "id" );
  39. }
  40. } );
  41. }
  42. } );
  43. } );