Skip to content

Commit 0cf6bc0

Browse files
committed
Tabs: Move logic for finding the tab list into its own function to allow overriding for rare usage scenarios.
1 parent b7af203 commit 0cf6bc0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/jquery.ui.tabs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ $.widget( "ui.tabs", {
209209
_processTabs: function() {
210210
var self = this;
211211

212-
this.list = this.element.find( "ol,ul" ).eq( 0 );
212+
this.list = this._getList();
213213
this.lis = $( " > li:has(a[href])", this.list );
214214
this.anchors = this.lis.map(function() {
215215
return $( "a", this )[ 0 ];
@@ -241,6 +241,11 @@ $.widget( "ui.tabs", {
241241
});
242242
},
243243

244+
// allow overriding how to find the list for rare usage scenarios (#7715)
245+
_getList: function() {
246+
return this.element.find( "ol,ul" ).eq( 0 );
247+
},
248+
244249
_createPanel: function( id ) {
245250
return $( "<div></div>" )
246251
.attr( "id", id )

0 commit comments

Comments
 (0)