]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Move logic for finding the tab list into its own function to allow overriding...
authorScott González <scott.gonzalez@gmail.com>
Sat, 21 Jan 2012 13:04:39 +0000 (08:04 -0500)
committerScott González <scott.gonzalez@gmail.com>
Sat, 21 Jan 2012 13:04:39 +0000 (08:04 -0500)
ui/jquery.ui.tabs.js

index 0429363f22f9358117e279c88c7622e10198cb3e..168aa0ee55153a10dc63ee0d619d19272f522270 100644 (file)
@@ -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 )