aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tabs.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-07-17 18:50:47 -0400
committerScott González <scott.gonzalez@gmail.com>2010-07-17 18:50:47 -0400
commit5435c50765e89f5cfb1c164dda6642c2149dc4db (patch)
tree1d05c8983905e6ae3b7a832a1cf548f66aa0e7b1 /ui/jquery.ui.tabs.js
parent7e03d4ea9deee68e928651ef80c6c673c479b88d (diff)
downloadjquery-ui-5435c50765e89f5cfb1c164dda6642c2149dc4db.tar.gz
jquery-ui-5435c50765e89f5cfb1c164dda6642c2149dc4db.zip
Tabs: Fixed select method handling for index of -1.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r--ui/jquery.ui.tabs.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 592f1a866..5555b95f5 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -575,8 +575,12 @@ $.widget("ui.tabs", {
select: function(index) {
index = this._getIndex(index);
- if (index == -1 && this.options.collapsible) {
- index = this.options.selected;
+ if (index == -1) {
+ if (this.options.collapsible && this.options.selected != -1) {
+ index = this.options.selected;
+ } else {
+ return this;
+ }
}
this.anchors.eq(index).trigger(this.options.event + '.tabs');
return this;