]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: always hide added panels, fixes #3875
authorKlaus Hartl <klaus.hartl@googlemail.com>
Thu, 22 Jan 2009 21:48:39 +0000 (21:48 +0000)
committerKlaus Hartl <klaus.hartl@googlemail.com>
Thu, 22 Jan 2009 21:48:39 +0000 (21:48 +0000)
ui/ui.tabs.js

index bc6f6f0f859b39a9b64b9faa326b44b10dbaa802..86ca68a378127d1e9d4cb9c6879a8312c2237ca4 100644 (file)
@@ -381,11 +381,9 @@ $.widget("ui.tabs", {
                // try to find an existing element before creating a new one
                var $panel = $('#' + id);
                if (!$panel.length) {
-                       $panel = $(o.panelTemplate).attr('id', id)
-                               .addClass('ui-tabs-hide')
-                               .data('destroy.tabs', true);
+                       $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
                }
-               $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
+               $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
                if (index >= this.$lis.length) {
                        $li.appendTo(this.list);
                        $panel.appendTo(this.list[0].parentNode);