This constructor is not exported. Use the function low.tag to create a node instead.
| Name | Type | Description |
|---|---|---|
t |
string |
The tag name. |
- See:
Methods
-
attr (key, value)low.Tag
-
Sets an attribute value.
Name Type Description keystring The attribute key.
valuestring The attribute value.
Returns:
Type Description low.Tag This object for chaining further commands. -
child (n)low.Tag
-
Returns the n-th child of the node.
Negative values for
nmay be used to count from the end of the list of children. For example,-1returns the last child.Name Type Description nnumber The number of the child.
Returns:
Type Description low.Tag The n-th child node. -
class (c)low.Tag
-
Adds a CSS class to the node. Multiple classes may be set by calling this method multiple times.
Name Type Description cstring The class name.
Returns:
Type Description low.Tag This object for chaining further commands. -
content (c)low.Tag
-
Adds a child node.
Name Type Description clow.Tag The child node.
Returns:
Type Description low.Tag This object for chaining further commands. -
content (c)low.Tag
-
Adds content text on the node.
Name Type Description cstring The content text.
Returns:
Type Description low.Tag This object for chaining further commands. -
data (name, value)low.Tag
-
Sets a data attribute.
Calling
tag.data("role", "page")is the same as callingtag.attr("data-role", "page").Name Type Description namestring The data attribute name.
valuestring The data attribute value.
Returns:
Type Description low.Tag This object for chaining further commands. -
Creates the HTML code representation of the tag node tree. Use with low.createElementTree for creating a DOM node tree.
Returns:
Type Description string The HTML code. -
id (id)low.Tag
-
Sets the HTML ID value. HTML IDs must be unique within a document.
Name Type Description idstring The ID value.
Returns:
Type Description low.Tag This object for chaining further commands. -
on (ev, handler)low.Tag
-
Sets a DOM event handler.
Name Type Description evstring The event name, e.g.
click.handlerstring The event callback as string.
Returns:
Type Description low.Tag This object for chaining further commands. -
Sets a CSS property.
Name Type Description keystring The CSS property key.
valuestring The CSS property value.
Returns:
Type Description low.blobTag This object for chaining further commands.