1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.Element</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.Element-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.Element-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.Element-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.Element-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
57 <tr><td class="label">Defined In:</td><td class="hd-info">
59 <a href="./src/Roo_Element.js.html">Roo/Element.js</a>.
62 <tr><td class="label">Class:</td><td class="hd-info">Element</td></tr>
65 <tr><td class="label">Subclasses:</td><td class="hd-info">
66 <a href="./Roo.Layer.html#constructor" roo:cls="Roo.Layer.html#constructor">Roo.Layer</a>
77 <!-- ============================== class summary ========================== -->
78 <div class="description">
79 Represents an Element in the DOM.<br><br><br/>Usage:<br><br/><pre><code><br/>var el = Roo.get("my-div");<br/><br/>// or with getEl<br/>var el = getEl("my-div");<br/><br/>// or with a DOM element<br/>var el = Roo.get(myDivElement);<br/></code></pre><br/>Using Roo.get() or getEl() instead of calling the constructor directly ensures you get the same object<br/>each call instead of constructing a new one.<br><br><br/><b>Animations</b><br /><br/>Many of the functions for manipulating an element have an optional "animate" parameter. The animate parameter<br/>should either be a boolean (true) or an object literal with animation options. The animation options are:<br/><pre><br/>Option Default Description<br/>--------- -------- ---------------------------------------------<br/>duration .35 The duration of the animation in seconds<br/>easing easeOut The YUI easing method<br/>callback none A function to execute when the anim completes<br/>scope this The scope (this) of the callback function<br/></pre><br/>Also, the Anim object being used for the animation will be set on your options object as "anim", which allows you to stop or<br/>manipulate the animation. Here's an example:<br/><pre><code><br/>var el = Roo.get("my-div");<br/><br/>// no animation<br/>el.setWidth(100);<br/><br/>// default animation<br/>el.setWidth(100, true);<br/><br/>// animation with some options set<br/>el.setWidth(100, {<br/> duration: 1,<br/> callback: this.foo,<br/> scope: this<br/>});<br/><br/>// using the "anim" property to get the Anim object<br/>var opt = {<br/> duration: 1,<br/> callback: this.foo,<br/> scope: this<br/>};<br/>el.setWidth(100, opt);<br/>...<br/>if(opt.anim.isAnimated()){<br/> opt.anim.stop();<br/>}<br/></code></pre><br/><b> Composite (Collections of) Elements</b><br /><br/>For working with collections of Elements, see <a href="Roo.CompositeElement.html">Roo.CompositeElement</a>
83 <!-- ============================== Class comment block... ========================== -->
85 <div class="comments">
86 <b>Class Comments / Notes</B> =>
87 <u onclick="parent.CommentDialog.showCommentId = 'Roo.Element';">[Add Your comment/notes about this class]</u>
89 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
90 src="/blog.php/GtkDjsComments/Roo.Element.html"></iframe>
95 <!-- ============================== config options ========================== -->
100 <div class="hr"></div>
101 <a id="Roo.Element-configs"></a>
105 <table cellspacing="0" class="member-table">
106 <caption class="Empty">Config Options - Has None</caption>
120 <!-- ============================== public properties ==================== -->
124 <a id="Roo.Element-props"></a>
130 <table cellspacing="0" class="member-table">
131 <caption class="Empty">Public Properties - Has None</caption>
137 <!-- ============================== methods summary / details ======================== -->
140 <a id="Roo.Element-methods"></a>
141 <!-- constructor?? -->
148 <!-- then dynamics first -->
155 <table cellspacing="0" class="member-table">
156 <caption>Public Methods</caption>
158 <th class="sig-header" colspan="2">Method</th>
159 <th class="msource-header">Defined By</th>
169 <tr class="method-row config-row-alt0 expandable notInherited">
170 <td class="micon"><a class="exi" href="#expand"> </a></td>
174 <a id="Roo-method-Element" name=".Element"></a>
175 <div class="fixedFont">
176 <span class="attributes">new <B>Roo.</B></span><b class="itemname">Element</b>
178 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement <B><i>element</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>forceNew</i></B>)
186 <div class="short">Create a new Roo.Element</div>
193 Create a new Roo.Element
196 <dl class="detailList">
197 <dt class="heading">Parameters:</dt>
200 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement</span> <b>element</b>
206 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>forceNew</b>
209 <dd>(optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).</dd>
236 <!-- ============================== events summary / details ======================== -->
239 <a id="Roo.Element-events"></a>
245 <table cellspacing="0" class="member-table">
246 <caption class="Empty">Events - Has None</caption>
257 <!-- ============================== footer ================================= -->
258 <div class="fineprint" style="clear:both">
260 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Thu Jul 22 2010 10:38:32 GMT+0800 (HKT)
262 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>