standard header in about page (#676)
[openemr.git] / public / assets / jquery-ui-1-12-1 / ui / unique-id.js
blob9e45f0afa30028e9008603ec96360514d7162c48
1 /*!
2  * jQuery UI Unique ID 1.12.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  */
10 //>>label: uniqueId
11 //>>group: Core
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 );
20         } else {
22                 // Browser globals
23                 factory( jQuery );
24         }
25 } ( function( $ ) {
27 return $.fn.extend( {
28         uniqueId: ( function() {
29                 var uuid = 0;
31                 return function() {
32                         return this.each( function() {
33                                 if ( !this.id ) {
34                                         this.id = "ui-id-" + ( ++uuid );
35                                 }
36                         } );
37                 };
38         } )(),
40         removeUniqueId: function() {
41                 return this.each( function() {
42                         if ( /^ui-id-\d+$/.test( this.id ) ) {
43                                 $( this ).removeAttr( "id" );
44                         }
45                 } );
46         }
47 } );
49 } ) );