Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is EXT JS's method to use "display:none"

Hello I have to load an ajax element into div. That div would earlier have another sub div by the name div1, and to remove/hide the div1, I am doing a Ext.get('div1').hide(). But this is doing a visibility:hidden, rather than doing a display:none.

I wanted to know what is the method to do a display:none rather than a visibility:hidden.

like image 742
macha Avatar asked Mar 23 '11 15:03

macha


People also ask

Why do we use display none?

display: none; is commonly used with JavaScript to hide and show elements without deleting and recreating them.

How do you hide ext?

To start Hide Folder Ext, click Start button, click All Programs, click Hide Folder Ext and click Hide Folder Ext shortcut. If you have Hide Folder Ext on your external disk, you may run it from this disk using Windows Explorer. Hide Folder Ext application file name is hfext.exe.

Is it OK to use display none?

You can use display: none to hide that element, and then turn it back on with media queries later. This is an acceptable use of display: none because you're not trying to hide anything for nefarious reasons but have a legitimate need to do so.

How does display none work?

display:none removes the element from the document. It does not take up any space.


1 Answers

You have to change the visibility mode to display.

var element = Ext.get('div1');
element.setVisibilityMode(Ext.Element.DISPLAY);
element.hide();
like image 157
Robby Pond Avatar answered Sep 28 '22 02:09

Robby Pond