Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tabs: Removed instances of " .. + (++ .." to avoid a minification bug…

… in closure compiler. Fixes #5576 - invalid increment operand.
  • Loading branch information...
commit fcbf4c0872cfc0b0c9fa9e6808ff0654e4decd98 1 parent bf67347
@scottgonzalez scottgonzalez authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 ui/jquery.ui.tabs.js
View
12 ui/jquery.ui.tabs.js
@@ -16,6 +16,14 @@
var tabId = 0,
listId = 0;
+function getNextTabId() {
+ return ++tabId;
+}
+
+function getNextListId() {
+ return ++listId;
+}
+
$.widget("ui.tabs", {
options: {
add: null,
@@ -56,7 +64,7 @@ $.widget("ui.tabs", {
_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) {
@@ -64,7 +72,7 @@ $.widget("ui.tabs", {
},
_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)));
},
Please sign in to comment.
Something went wrong with that request. Please try again.