diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-03-01 14:32:29 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-03-01 14:32:29 +0000 |
commit | 240a588bce03e72ca48527f3f7887261f505999b (patch) | |
tree | 4397d8a816a8d3dc2214d95d323891ec18e5550f /ui/ui.tabs.js | |
parent | 676ea7f248c94d351325e8aeafed12b35630c76c (diff) | |
download | jquery-ui-240a588bce03e72ca48527f3f7887261f505999b.tar.gz jquery-ui-240a588bce03e72ca48527f3f7887261f505999b.zip |
Tabs: few fixes required in destroy method, removed ol as tabifyable element
Diffstat (limited to 'ui/ui.tabs.js')
-rw-r--r-- | ui/ui.tabs.js | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index cfbdbd4a8..1fa32962a 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -65,13 +65,13 @@ $.widget("ui.tabs", { .find('span:data(label.tabs)') .each(function() { var el = $(this); - el.html(el.data('label.tabs')); + el.html(el.data('label.tabs')).removeData('label.tabs'); }); }, _tabify: function(init) { - this.list = this.element.children('ul:first, ol:first').eq(0); + this.list = this.element.children('ul:first'); this.lis = $('li:has(a[href])', this.list); this.anchors = this.lis.map(function() { return $('a', this)[0]; }); this.panels = $([]); @@ -391,8 +391,10 @@ $.widget("ui.tabs", { destroy: function() { var o = this.options; + this.abort(); + this.element.unbind('.tabs') - .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all') + .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible') .removeData('tabs'); this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'); @@ -413,18 +415,19 @@ $.widget("ui.tabs", { $(this).remove(); } else { - $(this).removeClass( - 'ui-state-default ' + - 'ui-corner-top ' + - 'ui-tabs-selected ' + - 'ui-state-active ' + - 'ui-state-hover ' + - 'ui-tabs-collapsible ' + - 'ui-state-disabled ' + - 'ui-tabs-panel ' + - 'ui-widget-content ' + - 'ui-corner-bottom ' + - 'ui-tabs-hide'); + $(this).removeClass([ + 'ui-state-default', + 'ui-corner-top', + 'ui-tabs-selected', + 'ui-state-active', + 'ui-state-hover', + 'ui-state-focus', + 'ui-state-disabled', + 'ui-tabs-panel', + 'ui-widget-content', + 'ui-corner-bottom', + 'ui-tabs-hide' + ].join(' ')); } }); |