2 * jQuery UI Unique ID 1.12.1
5 * Copyright jQuery Foundation and other contributors
6 * Released under the MIT license.
7 * http://jquery.org/license
12 //>>description: Functions to generate and remove uniqueId's
13 //>>docs: http://api.jqueryui.com/uniqueId/
15 ( function( factory ) {
16 if ( typeof define === "function" && define.amd ) {
18 // AMD. Register as an anonymous module.
19 define( [ "jquery", "./version" ], factory );
28 uniqueId: ( function() {
32 return this.each( function() {
34 this.id = "ui-id-" + ( ++uuid );
40 removeUniqueId: function() {
41 return this.each( function() {
42 if ( /^ui-id-\d+$/.test( this.id ) ) {
43 $( this ).removeAttr( "id" );