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

不羁岁月 提交于 2019-12-21 09:17:10

问题


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.


回答1:


You have to change the visibility mode to display.

var element = Ext.get('div1');
element.setVisibilityMode(Ext.Element.DISPLAY);
element.hide();


来源:https://stackoverflow.com/questions/5407827/what-is-ext-jss-method-to-use-displaynone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!