From: Scott González Date: Tue, 29 May 2012 14:04:20 +0000 (-0400) Subject: Tabs: Simplify _findActive() now that hrefs are never used. X-Git-Tag: 1.9.0-beta.1~93 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=234ced07ef55df99f1886f47b7783dcbec33a77c;p=jquery-ui.git Tabs: Simplify _findActive() now that hrefs are never used. --- diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 1224f47b9..9c5de53d1 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -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 ) {