Hello !
I have some <div id="text">abc</div>
.
Is it possible to get it's size using JS
/mooTools
(width
and height
) when I did not set it with CSS
?
Hello !
I have some <div id="text">abc</div>
.
Is it possible to get it's size using JS
/mooTools
(width
and height
) when I did not set it with CSS
?
http://mootools.net/docs/core/Element/Element.Dimensions#Element:getSize
var size = myElement.getSize();
[size.x, size.y]
$('myElement').getStyle('width');
returns the width of that element.
$('myElement').setStyle('width', 'value');
u can change it
thats all :)