Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Added documentation for accessing underlying DOM elements via indexes on #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion views/docs/basics.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<h1><a name="Basics">Basics</a></h1>

<p>Includes functionality used to manipulate the xui object collection.</p>
Expand Down Expand Up @@ -75,6 +74,18 @@ var l = x$('.notice').last();
x$('#second').find('li'); // returns list items "three" and "four"
</code></pre>

<h3>example</h3>

<p>Given the input field in a form:</p>

<pre><code>&lt;input id="first" type="text" value="xuijs" /&gt;</code></pre>

<p>We can access the underlying DOM elements in an XUI set by index</p>

<pre><code>x$('#first').attr('value'); // returns 'value' via the XUI set function <code>attr</code>
x$('#first')[0].value; // returns 'value' via the underlying DOM element attribute
</code></pre>

<h2>set</h2>

<p>Sets the objects in the xui collection.</p>
Expand Down