Base Element Element

Home | Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | Plugins | Mobile | Troubleshooting | About

Table of Contents

1 Base Element

In object-oriented parlance, all Nitrogen elements are subclasses of the base element. This means that all Nitrogen elements can use the attributes listed below.

Usage

#some_element { id=myElementID, show_if=true, class="someclass", style="border: solid 1px black;" }

Attributes

id - (atom)
The id of the element within the element tree. The id is used to wire events and to reference the element in client side javascript. See the Nitrogen wiki for more information.
actions - (action, list of actions)
The actions to attach to the element. This can be a single Nitrogen action, or a list of actions.
show_if - (boolean)
If set to true, this element will be rendered. Otherwise, it will not.
class - (atom or string)
Set the CSS class of the element.
style - (string)
Sets inline CSS style on the element.
data_fields - (property list)
Sets a series of HTML data- fields in the element. For example, the following #panel:
#panel{
        data_fields=[
                {ship, bounty},
                {action, mutiny}
        ]
}

Would produce the following pseudo-HTML:

<div data-ship="bounty" data-action="mutiny"></div>

Date: 2013-11-03 20:16:45 CST

Author: Rusty Klophaus (@rustyio)

Org version 7.8.02 with Emacs version 23

Validate XHTML 1.0

Comments

Note:To specify code blocks, just use the generic code block syntax:
<pre><code>your code here</code></pre>


comments powered by Disqus