From 9a786e03a1edda7efb31b0ad6b20e5bcd62d9482 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 25 Dec 2009 18:25:46 +0000 Subject: Tabs: fixed to work with empty nav list again. Fixes #4997 - No longer possible to start with empty tab then add() elements dynamically. --- ui/jquery.ui.tabs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 32f326d00..b9fad83d4 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -68,8 +68,7 @@ $.widget("ui.tabs", { _tabify: function(init) { - // use $('li:first').parent() so we can find the first ul/ol in DOM order - this.list = this.element.find('li:first').parent(); + this.list = this.element.find('ol,ul').eq(0); this.lis = $('li:has(a[href])', this.list); this.anchors = this.lis.map(function() { return $('a', this)[0]; }); this.panels = $([]); -- cgit v1.2.3