diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-17 18:50:47 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-17 18:50:47 -0400 |
commit | 5435c50765e89f5cfb1c164dda6642c2149dc4db (patch) | |
tree | 1d05c8983905e6ae3b7a832a1cf548f66aa0e7b1 /ui/jquery.ui.tabs.js | |
parent | 7e03d4ea9deee68e928651ef80c6c673c479b88d (diff) | |
download | jquery-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.js | 8 |
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; |