diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-05-17 20:48:07 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-05-17 20:48:07 -0400 |
commit | fcbf4c0872cfc0b0c9fa9e6808ff0654e4decd98 (patch) | |
tree | f07da4ba4db2d6b42bf7f87fec377e75f49e7f3a /ui/jquery.ui.tabs.js | |
parent | bf673476ee6a20cb1ca4f7bd7e8c78ed008a27f6 (diff) | |
download | jquery-ui-fcbf4c0872cfc0b0c9fa9e6808ff0654e4decd98.tar.gz jquery-ui-fcbf4c0872cfc0b0c9fa9e6808ff0654e4decd98.zip |
Tabs: Removed instances of " .. + (++ .." to avoid a minification bug in closure compiler. Fixes #5576 - invalid increment operand.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r-- | ui/jquery.ui.tabs.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 8b6d72329..a934c0f21 100644 --- a/ui/jquery.ui.tabs.js +++ b/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))); }, |