Bug Tracker

Modify

Ticket #2883 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

UI Tabs - Css Class ui-tabs-panel not added to exsisting element

Reported by: sparkooo Owned by: paul
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by sparkooo

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

comment:2 Changed 5 years ago by scott.gonzal

  • Owner set to paul
  • Component changed from core to ui

comment:3 Changed 5 years ago by scott.gonzal

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [5641]. Thanks.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.