Classes
- API Home
- _global_
- Array
- Jelo
- Jelo.Ajax
- Jelo.Anim
- Jelo.Core
- Jelo.CSS
- Jelo.Dom
- Jelo.DragDrop
- Jelo.Env
- Jelo.Event
- Jelo.JSON
- Jelo.Widget
Class Jelo.Widget
Defined in: Jelo.Widget.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new basic Widget.
|
| Field Attributes | Field Name and Description |
|---|---|
| <constant> |
Not typically used, but may come in useful if your code needs to make sure it is acting on a Jelo.Widget.
|
| Method Attributes | Method Name and Description |
|---|---|
|
destroy()
Attempts to remove this widget from the current page.
|
|
|
disable()
Disables the widget.
|
|
|
enable()
Enables the widget.
|
|
|
render(parent)
Adds the element to the current page.
|
Class Detail
Jelo.Widget()
Creates a new basic Widget. This is typically only used as follows:
Jelo.mold('MyNewWidget', function() {
this.dom = Jelo.Dom.fromString('<h1>My New Widget</h1>');
});
Jelo.MyNewWidget.prototype = new Jelo.Widget(); // inherit common functionality
Widgets have a private HTMLElement property, dom, that should be considered a "protected property" - that is, external objects should only be able to manipulate a Widget's dom by using that widget's public methods. Those public methods can then access this.dom. This is not a rule, but it is a strong suggestion.
Field Detail
<constant>
{Boolean}
isWidget
Not typically used, but may come in useful if your code needs to make sure it is acting on a Jelo.Widget.
Method Detail
{Boolean}
destroy()
Attempts to remove this widget from the current page.
- Returns:
- {Boolean} True if successful, false if not. This return value can be safely ignored.
disable()
Disables the widget. By default, it only adds the class "unselectable" so that you can decide what behavior that implies.
enable()
Enables the widget. By default, it only removes the class "unselectable" so that you can decide what behavior that implies.
render(parent)
Adds the element to the current page.
- Parameters:
- {HTMLElement} parent Optional, Default: document.body
- The node to which this widget will be rendered.
- recent changes — (see all)
-
- Sep 14, 2010 — Simplified DragDrop.
- Jul 19, 2010 — Fixed typo preventing reliably aborting pending Ajax requests.
- Jun 17, 2010 — Fixed a conflict preventing Easing.SWINGOUT and Easing.SWINGBOTH from running simultaneously.
- Apr 22, 2010 — Added Array support to CSS.toggleClass.
- random jelo shots — (see all)
