-
2 Feb 2012 8:33 AM #1
Answered: [PR4]->[B1] dom element remove
Answered: [PR4]->[B1] dom element remove
Hi,
In my html file :
and in my app.js [PR4] :Code:<body><div id="loading-mask"></div></body>
in [B1], I use :Code:launch: function() { Ext.create('myApp.view.Main'); var loadmask = Ext.get('loading-mask'); loadmask.remove(); }
but it's not working. Some ideas ?Code:launch: function() { Ext.create('mtApp.view.Main'); var loadmask = Ext.get('loading-mask'); Ext.removeNode(loadmask); }
thx
-
Best Answer Posted by clarose
I noticed that as well, so I use the "destroy" method
instead of "remove" and that works fine. For me, "destroy" works out better since I want to actually remove the component from the DOM, not just hide it.Code:loadMask.destroy();
-
2 Feb 2012 8:39 AM #2
when using :
it worksCode:loadmask.hide();
-
2 Feb 2012 8:40 AM #3
I noticed that as well, so I use the "destroy" method
instead of "remove" and that works fine. For me, "destroy" works out better since I want to actually remove the component from the DOM, not just hide it.Code:loadMask.destroy();
-
2 Feb 2012 8:47 AM #4
yes I was testing the "destroy" method
thx
-
2 Feb 2012 10:43 AM #5
Yup, remove has been deprecated in beta 1. If you use the compat build you will see the deprecation warnings when you use it. More information about the compat build here:
http://docs.sencha.com/touch/2-0/#!/guide/buildingSencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.


Reply With Quote