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) {
|
select: function(index) {
|
||||||
index = this._getIndex(index);
|
index = this._getIndex(index);
|
||||||
if (index == -1 && this.options.collapsible) {
|
if (index == -1) {
|
||||||
index = this.options.selected;
|
if (this.options.collapsible && this.options.selected != -1) {
|
||||||
|
index = this.options.selected;
|
||||||
|
} else {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.anchors.eq(index).trigger(this.options.event + '.tabs');
|
this.anchors.eq(index).trigger(this.options.event + '.tabs');
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user