aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tabs.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-01-21 08:04:39 -0500
committerScott González <scott.gonzalez@gmail.com>2012-01-21 08:04:39 -0500
commit0cf6bc042938a11abc09ed4e575c8792585607ac (patch)
tree2272060e664d3338e16e3141d64875f801b9c003 /ui/jquery.ui.tabs.js
parentb7af203c8e9db1d253bca7aeb66350280402ca1c (diff)
downloadjquery-ui-0cf6bc042938a11abc09ed4e575c8792585607ac.tar.gz
jquery-ui-0cf6bc042938a11abc09ed4e575c8792585607ac.zip
Tabs: Move logic for finding the tab list into its own function to allow overriding for rare usage scenarios.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r--ui/jquery.ui.tabs.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 0429363f2..168aa0ee5 100644
--- a/ui/jquery.ui.tabs.js
+++ b/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 )