Skip to content
Browse files

Tabs: Move logic for finding the tab list into its own function to al…

…low overriding for rare usage scenarios.
  • Loading branch information...
1 parent b7af203 commit 0cf6bc042938a11abc09ed4e575c8792585607ac @scottgonzalez scottgonzalez committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 ui/jquery.ui.tabs.js
View
7 ui/jquery.ui.tabs.js
@@ -209,7 +209,7 @@ $.widget( "ui.tabs", {
_processTabs: function() {
var self = this;
- this.list = this.element.find( "ol,ul" ).eq( 0 );
+ this.list = this._getList();
this.lis = $( " > li:has(a[href])", this.list );
this.anchors = this.lis.map(function() {
return $( "a", this )[ 0 ];
@@ -241,6 +241,11 @@ $.widget( "ui.tabs", {
});
},
+ // allow overriding how to find the list for rare usage scenarios (#7715)
+ _getList: function() {
+ return this.element.find( "ol,ul" ).eq( 0 );
+ },
+
_createPanel: function( id ) {
return $( "<div></div>" )
.attr( "id", id )

0 comments on commit 0cf6bc0

Please sign in to comment.
Something went wrong with that request. Please try again.