View Full Version : How to update a div's style?

1 May 2012, 3:05 PM

I have some logic around a panel toggleCollapse() firing when tabs are closed, it seems that when I close a tab and try to expand a north panel in a Viewport the contents of the panel have the visibility hidden:

<div id="app-header-body" class="x-panel-body x-panel-body-default x-column-layout-ct x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left" style="left: 0px; top: 51px; width: 1920px; visibility: hidden; height: 151px;">

I'm attempting to have this div visibile and I'm trying:

Ext.get('app-header-body').dom.style.setProperty('visibility', 'visible', null);

However it seems this isn't having an effect. How do I apply the style for that div?


1 May 2012, 4:02 PM
Do you try Ext.get('app-header-body').setStyle('visibility', 'visible')?

2 May 2012, 7:14 AM
Thanks for your reply, I tried:

Ext.get('app-header-body').setStyle('visibility', 'visible')

but it also seems to have no effect on the element.

I can add inline styles to the element however, I cannot change or remove the visibility property.