File tree 1 file changed +10
-2
lines changed 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 16
16
var tabId = 0 ,
17
17
listId = 0 ;
18
18
19
+ function getNextTabId ( ) {
20
+ return ++ tabId ;
21
+ }
22
+
23
+ function getNextListId ( ) {
24
+ return ++ listId ;
25
+ }
26
+
19
27
$ . widget ( "ui.tabs" , {
20
28
options : {
21
29
add : null ,
@@ -56,15 +64,15 @@ $.widget("ui.tabs", {
56
64
57
65
_tabId : function ( a ) {
58
66
return a . title && a . title . replace ( / \s / g, '_' ) . replace ( / [ ^ A - Z a - z 0 - 9 \- _ : \. ] / g, '' ) ||
59
- this . options . idPrefix + ( ++ tabId ) ;
67
+ this . options . idPrefix + getNextTabId ( ) ;
60
68
} ,
61
69
62
70
_sanitizeSelector : function ( hash ) {
63
71
return hash . replace ( / : / g, '\\:' ) ; // we need this because an id may contain a ":"
64
72
} ,
65
73
66
74
_cookie : function ( ) {
67
- var cookie = this . cookie || ( this . cookie = this . options . cookie . name || 'ui-tabs-' + ( ++ listId ) ) ;
75
+ var cookie = this . cookie || ( this . cookie = this . options . cookie . name || 'ui-tabs-' + getNextListId ( ) ) ;
68
76
return $ . cookie . apply ( null , [ cookie ] . concat ( $ . makeArray ( arguments ) ) ) ;
69
77
} ,
70
78
You can’t perform that action at this time.
0 commit comments