About Pi Downloads Documentation Plugins Developer Forum Issues

pi.util.Element2009-01-06 09:23:26

Summary

An object that contains some essential javascript tools for DOM.

Methods

getClass pi.util.Element.getClass(element);
Returns class names of given element.
hasClass pi.util.Element.hasClass(element,className);
Checks if the specified CSS class exists on the specified element's DOM node.
removeClass pi.util.Element.removeClass(element,className);
Removes the specified class of the specified element.
setClass pi.util.Element.setClass(element,value);
Replaces value of className attribute with given value.
toggleClass pi.util.Element.toggleClass(element,className);
Toggles the given CSS class on specified element.
getPosition pi.util.Element.getPosition(element)
Returns an object that contains position data of the given element.
getSize pi.util.Element.getSize( MyButton );
Returns an object that contains dimensions of the given element.
addStyle pi.util.Element.addStyle(element,{ CSSProperty:'CSSValue' });
Applies given css values from given hash to given element.
getValue element.environment.getValue(element);
Returns value of the given element.Input ve Textarea elementlerinin value attribute'unu, Select elementlerin secili option'inin degerini, geri kalanlarda innerHTML degerini dondurur.
getView element.environment.getView(CSSProperty (Optional));
Returns computed style of the given element.