mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Fixed select method handling for index of -1.
This commit is contained in:
parent
7e03d4ea9d
commit
5435c50765
8
ui/jquery.ui.tabs.js
vendored
8
ui/jquery.ui.tabs.js
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user