Div |
---|
class | Wiki Markup |
---|
{div:class=api-page | }
h1. fluid.allocateSimpleId(element) Section |
---|
Column |
---|
|
|
Allocate an id to the supplied element if it has none already, by a simple scheme resulting in ids
{section}
{column:width=70%}
Allocate an id to the supplied element if it has none already, by a simple scheme resulting in ids "fluid-id-nnnn" where nnnn is an increasing integer.
{code
javascript | javascript | bgColor | white |
---|
borderStyle | none |
---|
:javascript|borderStyle=none|bgColor=white}
fluid.allocateSimpleId(element);
{code}
*File name:* {{Fluid.js
Parameters
Span |
---|
class | }}
h2. Parameters
{span:class=borderless-table
element
| }
|*{{element}}*| (Element) The element to place the id on
. Return Value
Span |
---|
|
String | representing the id |
|
Column |
---|
|
Example
Code Block |
---|
javascript | javascript | . |
{span}
h2. Return Value
{span:class=borderless-table}
|*String*| representing the id |
{span}
{column}
{column:width=5%}
{column}
{column}
h3. See Also
* [fluid.allocateGuid]
{column}
{section}
----
h3. Example
{code:javascript}
var titleId = fluid.allocateSimpleId(title);
{code}
In this example, the string returned, {{titleId}} will be added as the {{id}} attribute to the {{title}} node.
{div}