Class Roo.Element

Package:Roo
Defined In: Roo/Element.js.
Class:Element
Subclasses: Roo.Layer
Represents an Element in the DOM.


Usage:


var el = Roo.get("my-div");

// or with getEl
var el = getEl("my-div");

// or with a DOM element
var el = Roo.get(myDivElement);

Using Roo.get() or getEl() instead of calling the constructor directly ensures you get the same object
each call instead of constructing a new one.


Animations

Many of the functions for manipulating an element have an optional "animate" parameter. The animate parameter
should either be a boolean (true) or an object literal with animation options. The animation options are:

Option Default Description
--------- -------- ---------------------------------------------
duration .35 The duration of the animation in seconds
easing easeOut The YUI easing method
callback none A function to execute when the anim completes
scope this The scope (this) of the callback function

Also, the Anim object being used for the animation will be set on your options object as "anim", which allows you to stop or
manipulate the animation. Here's an example:

var el = Roo.get("my-div");

// no animation
el.setWidth(100);

// default animation
el.setWidth(100, true);

// animation with some options set
el.setWidth(100, {
duration: 1,
callback: this.foo,
scope: this
});

// using the "anim" property to get the Anim object
var opt = {
duration: 1,
callback: this.foo,
scope: this
};
el.setWidth(100, opt);
...
if(opt.anim.isAnimated()){
opt.anim.stop();
}

Composite (Collections of) Elements

For working with collections of Elements, see Roo.CompositeElement
Class Comments / Notes => [Add Your comment/notes about this class]
Config Options - Has None
Public Properties
Property Description Defined By
 
Roo.Element.DISPLAY : Number
Visibility mode constant - Use display to hide element
Visibility mode constant - Use display to hide element
Roo.Element
 
Roo.Element.VISIBILITY : Number
Visibility mode constant - Use visibility to hide element
Visibility mode constant - Use visibility to hide element
Roo.Element
Public Methods
Method Defined By
Events - Has None
Documentation generated by Introspection Doc Generator on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT) Based on JsDoc Toolkit