PDA

View Full Version : getAttribute is missing?



atma
26 Dec 2009, 10:17 PM
Hi!
I'm trying to get an attribute with Ext.Element.getAttribute('some-attr') but always get undefined.
For example:



var ml = Ext.fly('ux-element').getAttribute('margin-left');
console.log(ml);
or


var el = Ext.get('ux-element');
var ml = el.getAttribute('margin-left');
console.log(ml);
What I doing wrong?
And another question. Why in Ext core is absent getMargin (like a getPadding or getBorderWidth)?

atma
27 Dec 2009, 10:22 AM
I've been stupid...


el.getStyle('margin-left');