Impossible to initialize an empty tabset
There is no possibility to initialize an empty tabset (e.g. to add all tabs dynamically.
Small fix in tabify() method (line 183) make things better:
if (this.$tabs.length && $.data(this.$tabs[o.initial], 'href')) {
Lines 362-373 of ui.tabs.js (add method):
if (url.indexOf('#') == 0) { // ajax container is created by tabify automatically
var $container = $(url);
// try to find an existing element before creating a new one
$container = ($container.length && $container || $('<div id="' + url.replace('#', '') + '" class="' + o.containerClass + ' ' + o.hideClass + '"></div>'))
[method](position > 0 ? this.$containers[position - 1] : $(this.source));
}
var $foo = $('<li><a href="' + url + '"><span>' + text + '</span></a></li>');
if(position > 0) $foo[method](this.$tabs.slice(position - 1, position).parents('li:eq(0)'));
else {
$foo.appendTo($(this.source));
$container.removeClass('ui-tabs-hide');
}
Basically we've to check if this.$tabs array is not empty...
Change History (5)
Description: |
modified (diff)
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Milestone 1.2.2 deleted