<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pamaya - Web Design &#38; Development North Wales - Software Development, Graphic Design and Branding &#187; object</title>
	<atom:link href="http://www.pamaya.com/tags/object/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pamaya.com</link>
	<description>Web Design and Development North Wales</description>
	<lastBuildDate>Wed, 30 Mar 2011 14:45:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery Object to jQuery DOM Element</title>
		<link>http://www.pamaya.com/jquery-object-to-jquery-dom-element/</link>
		<comments>http://www.pamaya.com/jquery-object-to-jquery-dom-element/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 17:06:31 +0000</pubDate>
		<dc:creator>Maja Williams</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[object]]></category>

		<guid isPermaLink="false">http://www.pamaya.com/?p=243</guid>
		<description><![CDATA[Just a small article describing how to create a jQuery DOM Element from a jQuery HTML Object.]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to help you guys out there trying to work out how to create a jQuery DOM Element object from a returned jQuery Object<br />
<span id="more-243"></span> that you got from a code snippet like the one below:</p>
<pre name="code" class="javascript">(function ($) {
    var elms = $('#a-form').find ('input');
})(jQuery);</pre>
<p>Now I&#8217;m sure that there are a million better ways to do this in jQuery, but for what I had to do it was just fine. So say we want to iterate through the returned jQuery Objects using the <em>each</em> method:</p>
<pre name="code" class="javascript">(function ($) {
    var elms = $('#a-form').find ('input');
    elms.each ( function () {

    });
})(jQuery);</pre>
<p>So how would you use the jQuery Objects that you will iterate through in this code snippet as jQuery DOM Elements? Well there are two ways. You can ether use the<em> this</em> with the $ selector as follows:</p>
<pre name="code" class="javascript">(function ($) {
    var elms = $('#a-form').find ('input');
    elms.each ( function () {
        $(this).click ( function () {
            //code here
        });
    });
})(jQuery);</pre>
<p>Or you could save the element into a variable for later use like so:</p>
<pre name="code" class="javascript">(function ($) {
    var elms = $('#a-form').find ('input');
    elms.each ( function () {
        var elm = $(this);
    });
})(jQuery);</pre>
<p>Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pamaya.com/jquery-object-to-jquery-dom-element/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

