12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- ( function( factory ) {
- if ( typeof define === "function" && define.amd ) {
-
- define( [ "jquery", "./version" ], factory );
- } else {
-
- factory( jQuery );
- }
- } ( function( $ ) {
- return $.fn.extend( {
- uniqueId: ( function() {
- var uuid = 0;
- return function() {
- return this.each( function() {
- if ( !this.id ) {
- this.id = "ui-id-" + ( ++uuid );
- }
- } );
- };
- } )(),
- removeUniqueId: function() {
- return this.each( function() {
- if ( /^ui-id-\d+$/.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- } );
- }
- } );
- } ) );
|