PDA

View Full Version : Couple quick ext core questions



ronnyek
7 May 2009, 10:02 AM
Is there a common practice to do the equivalent of jqueries plugins? do we just prototype them out?

And I want to use Ext core to take a div of child divs and say div with id of x move to first element in list. (jquery this involves selecting the targetdiv and prependto firstdiv)

Thanks

Condor
7 May 2009, 11:08 AM
Something like:

var x = Ext.get('x');
var parent = x.parent('div');
parent.insertFirst(x);

deanna
7 May 2009, 12:19 PM
Something like:

var x = Ext.get('x');
var parent = x.parent('div');
parent.insertFirst(x);

In the chaining style, which jquery users are familiar with, can this be done like



Ext.get('x').parent('div').insertFirst(Ext.get('x'));