]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Simplify _findActive() now that hrefs are never used.
authorScott González <scott.gonzalez@gmail.com>
Tue, 29 May 2012 14:04:20 +0000 (10:04 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 29 May 2012 14:04:20 +0000 (10:04 -0400)
ui/jquery.ui.tabs.js

index 1224f47b9e824731ad572c55b88da778f09acd8e..9c5de53d15b510726601a6b2bc3c5acfb752f867 100644 (file)
@@ -447,14 +447,8 @@ $.widget( "ui.tabs", {
                });
        },
 
-       _findActive: function( selector ) {
-               if ( typeof selector === "number" ) {
-                       return this.lis.eq( selector );
-               }
-               if ( typeof selector === "string" ) {
-                       return this.anchors.filter( "[href$='" + selector + "']" ).closest( "li" );
-               }
-               return $();
+       _findActive: function( index ) {
+               return index === false ? $() : this.lis.eq( index );
        },
 
        _getIndex: function( index ) {