Ext js: how to move element in DOM

Go To StackoverFlow.com

2

Is there a nice way in Ext to move elements in DOM? I want to move element 'iShouldBeInsideTheBox' inside the 'box' element and then back to it's original location in between two p elements:

<p>
    surrounding text
</p>
<p id="iShouldBeInsideTheBox">
    This should be inside the box
</p>
<p>
    surrounding text
</p>
<p id="box">
    Some content in the box
</p>

It took me four lines to do that in jQuery (fiddle: http://jsfiddle.net/F2PXw/19/), but I can't think of easy ways to do that in Ext (or pure JS if it's reliable).

2012-04-04 02:38
by valentinas


1

what version do you want ??

ext 4.0.7 : http://jsfiddle.net/mohammad_erdin/cdLPA/

but, should work in old version...
never try : )

one more thing:
Please look carefully, the different between Ext.get and Ext.query
there is no # char in Ext.get

2012-04-04 04:03
by Egy Mohammad Erdin
Ah, i see. Ext uses the same method names as regular JS. That will do, thanks - valentinas 2012-04-04 04:14