aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-11-09 02:36:32 +0000
committerScott González <scott.gonzalez@gmail.com>2009-11-09 02:36:32 +0000
commitbff49fac188b0fa8ad85d9ce003666cd01c4dc38 (patch)
tree6cc86d22b3b6355ec1744915be3433e04ec16d33 /ui
parentb3a095d3ef7a186fe27fe19a0a40eeb496978284 (diff)
downloadjquery-ui-bff49fac188b0fa8ad85d9ce003666cd01c4dc38.tar.gz
jquery-ui-bff49fac188b0fa8ad85d9ce003666cd01c4dc38.zip
Tabs: Made detection of navigation more flexible - now the first descendant list (ul or ol) found will be used instead of forcing it to be the first child ul.
Fixes #4501 - Tabs should work with ordered lists (<ol>) in addition to unordered (<ul>) Fixes #4506 - tabs(): allow more flexibility in specifying what list is used
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tabs.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 18515fdf7..34b7daf1c 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -73,7 +73,8 @@ $.widget("ui.tabs", {
_tabify: function(init) {
- this.list = this.element.children('ul:first');
+ // use $('li:first').parent() so we can find the first ul/ol in DOM order
+ this.list = this.element.find('li:first').parent();
this.lis = $('li:has(a[href])', this.list);
this.anchors = this.lis.map(function() { return $('a', this)[0]; });
this.panels = $([]);