mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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
This commit is contained in:
parent
b3a095d3ef
commit
bff49fac18
3
ui/jquery.ui.tabs.js
vendored
3
ui/jquery.ui.tabs.js
vendored
@ -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 = $([]);
|
||||
|
Loading…
Reference in New Issue
Block a user