From fa62f21e5ad09e5368efc3079859730e23a7123b Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 9 Oct 2012 09:06:58 -0400 Subject: Tabs: Handle extraneous list items when using ui-tabs-active to set the initially active tab. Fixes #8568 - jQuery ui tabs: wrong default active li if ul contains extraneous elements. --- ui/jquery.ui.tabs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 506ee27d7..baf55d8dc 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -91,7 +91,7 @@ $.widget( "ui.tabs", { // check for a tab marked active via a class if ( active === null ) { - active = this.tabs.filter( ".ui-tabs-active" ).index(); + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); } // no active tab, set to false -- cgit v1.2.3