Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2883 closed bug (fixed)

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)
			}

Change History (5)

comment:1 Changed 15 years ago by sparkooo

Sorry added to core component instead of UI, unsure how to change this on ticket.

comment:2 Changed 15 years ago by Scott González

Component: coreui
Owner: set to paul

comment:3 Changed 15 years ago by Scott González

Resolution: fixed
Status: newclosed

Fixed in [5641]. Thanks.

comment:4 Changed 15 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:5 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.