File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1616var tabId = 0 ,
1717 listId = 0 ;
1818
19+ function getNextTabId ( ) {
20+ return ++ tabId ;
21+ }
22+
23+ function getNextListId ( ) {
24+ return ++ listId ;
25+ }
26+
1927$ . widget ( "ui.tabs" , {
2028 options : {
2129 add : null ,
@@ -56,15 +64,15 @@ $.widget("ui.tabs", {
5664
5765 _tabId : function ( a ) {
5866 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 ( ) ;
6068 } ,
6169
6270 _sanitizeSelector : function ( hash ) {
6371 return hash . replace ( / : / g, '\\:' ) ; // we need this because an id may contain a ":"
6472 } ,
6573
6674 _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 ( ) ) ;
6876 return $ . cookie . apply ( null , [ cookie ] . concat ( $ . makeArray ( arguments ) ) ) ;
6977 } ,
7078
You can’t perform that action at this time.
0 commit comments