
Документация
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
Custom Native to allow all of its methods to be used with any DOM element via the dollar function $.
Sets a CSS property to the Element.
myElement.setStyle(property, value);
//Both lines have the same effect. $('myElement').setStyle('width', '300px'); //The width is now 300px. $('myElement').setStyle('width', 300); //The width is now 300px.
Returns the style of the Element given the property passed in.
var style = myElement.getStyle(property);
$('myElement').getStyle('width'); //Returns "300px". $('myElement').getStyle('width').toInt(); //Returns 300.
Applies a collection of styles to the Element.
myElement.setStyles(styles);
$('myElement').setStyles({ border: '1px solid #000', width: 300, height: 400 });
Returns an object of styles of the Element for each argument passed in.
var styles = myElement.getStyles(property[, property2[, property3[, ...]]]);
$('myElement').getStyles('width', 'height', 'padding'); //returns {width: "10px", height: "10px", padding: "10px 0px 10px 0px"}
© Linux.ria.ua, 2008-2018 |