var tabId = 0,
listId = 0;
+function getNextTabId() {
+ return ++tabId;
+}
+
+function getNextListId() {
+ return ++listId;
+}
+
$.widget("ui.tabs", {
options: {
add: null,
_tabId: function(a) {
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
- this.options.idPrefix + (++tabId);
+ this.options.idPrefix + getNextTabId();
},
_sanitizeSelector: function(hash) {
},
_cookie: function() {
- var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + (++listId));
+ var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + getNextListId());
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
},