File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 1010 */
1111( function ( $ , undefined ) {
1212
13- var uuid = 0 ,
14- runiqueId = / ^ u i - i d - \d + $ / ;
15-
1613// $.ui might exist from components with no dependencies, e.g., $.ui.position
1714$ . ui = $ . ui || { } ;
1815
@@ -72,17 +69,21 @@ $.fn.extend({
7269 return ( / f i x e d / ) . test ( this . css ( "position" ) ) || ! scrollParent . length ? $ ( this [ 0 ] . ownerDocument || document ) : scrollParent ;
7370 } ,
7471
75- uniqueId : function ( ) {
76- return this . each ( function ( ) {
77- if ( ! this . id ) {
78- this . id = "ui-id-" + ( ++ uuid ) ;
79- }
80- } ) ;
81- } ,
72+ uniqueId : ( function ( ) {
73+ var uuid = 0 ;
74+
75+ return function ( ) {
76+ return this . each ( function ( ) {
77+ if ( ! this . id ) {
78+ this . id = "ui-id-" + ( ++ uuid ) ;
79+ }
80+ } ) ;
81+ } ;
82+ } ) ( ) ,
8283
8384 removeUniqueId : function ( ) {
8485 return this . each ( function ( ) {
85- if ( runiqueId . test ( this . id ) ) {
86+ if ( / ^ u i - i d - \d + $ / . test ( this . id ) ) {
8687 $ ( this ) . removeAttr ( "id" ) ;
8788 }
8889 } ) ;
You can’t perform that action at this time.
0 commit comments