From f23a8d4af8f680cab93a4d47ee0916e3952a1d11 Mon Sep 17 00:00:00 2001 From: Tony Lukasavage Date: Mon, 13 Jun 2011 17:03:22 -0700 Subject: [PATCH] Added documentation for accessing underlying DOM elements via indexes on XUI sets. --- views/docs/basics.ejs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/views/docs/basics.ejs b/views/docs/basics.ejs index a69c875..b1ac0b3 100644 --- a/views/docs/basics.ejs +++ b/views/docs/basics.ejs @@ -1,4 +1,3 @@ -

Basics

Includes functionality used to manipulate the xui object collection.

@@ -75,6 +74,18 @@ var l = x$('.notice').last(); x$('#second').find('li'); // returns list items "three" and "four" +

example

+ +

Given the input field in a form:

+ +
<input id="first" type="text" value="xuijs" />
+ +

We can access the underlying DOM elements in an XUI set by index

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

set

Sets the objects in the xui collection.