Search and Top Navigation
#2883 closed bug (fixed)
Opened May 16, 2008 03:34PM UTC
Closed May 20, 2008 02:53AM UTC
Last modified February 26, 2009 12:08PM UTC
UI Tabs - Css Class ui-tabs-panel not added to exsisting element
| Reported by: | sparkooo | Owned by: | paul | 
|---|---|---|---|
| Priority: | major | Milestone: | 1.5 | 
| Component: | ui.core | Version: | 1.2.3 | 
| Keywords: | Cc: | ||
| Blocked by: | Blocking: | 
Description
When adding tabs (through .tabs('add')) to an exsisting div element the class ui-tabs-panel is not applied, although this calss will be applied when creating tabs from the init. The below code fixed this for me
            // try to find an existing element before creating a new one
            var $panel = $('#' + id);
            if (!$panel.length) {
                $panel = $(o.panelTemplate).attr('id', id)
                    .addClass(o.panelClass).addClass(o.hideClass);
                $panel.data('destroy.tabs', true);
            }else{ // Ensure styling is applied to exsisting tab element
	       $panel.hasClass(o.panelClass) || $panel.addClass(o.panelClass)
			}
Attachments (0)
Change History (5)
Changed May 16, 2008 04:58PM UTC by comment:1
Changed May 16, 2008 07:23PM UTC by comment:2
| component: | core → ui | 
|---|---|
| owner: | → paul | 
Changed May 20, 2008 02:53AM UTC by comment:3
| resolution: | → fixed | 
|---|---|
| status: | new → closed | 
Fixed in [5641]. Thanks.
Changed May 24, 2008 03:39AM UTC by comment:4
| milestone: | 1.2.4 | 
|---|
Milestone 1.2.4 deleted
Changed February 26, 2009 12:08PM UTC by comment:5
| milestone: | → 1.5 | 
|---|
Sorry added to core component instead of UI, unsure how to change this on ticket.