<?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>Marc Dormey &#187; list</title>
	<atom:link href="http://www.marcdormey.com/index.php/tags/list/feed" rel="self" type="application/rss+xml" />
	<link>http://www.marcdormey.com</link>
	<description>Software Finds, Programming Tutorials and Gadget Reviews</description>
	<lastBuildDate>Wed, 18 Aug 2010 23:44:06 +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>Populating an ordered- or unordered list with JQuery via JSON</title>
		<link>http://www.marcdormey.com/index.php/archives/populating-a-ul-or-ol-list-via-json-result</link>
		<comments>http://www.marcdormey.com/index.php/archives/populating-a-ul-or-ol-list-via-json-result#comments</comments>
		<pubDate>Mon, 07 Sep 2009 16:02:12 +0000</pubDate>
		<dc:creator>Marcel</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[list]]></category>

		<guid isPermaLink="false">http://www.marcdormey.com/?p=111</guid>
		<description><![CDATA[Loading dynamic data into an ordered- or unordered list cannot be simpler.
First we create a template for each LI row:
var listRow = "&#60;li id=\"{0}\"&#62;{1}&#60;/li&#62;";
Then we call the ajax method and handle the JSON results:
// Now using my $.stringFormat method
// (see tag 'string format')
// we append the template with the correct values to the ul or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.marcdormey.com/wp-content/uploads/2009/10/jquery.jpg"><img src="http://www.marcdormey.com/wp-content/uploads/2009/10/jquery-150x150.jpg" alt="" title="jquery" width="150" height="150" class="alignright size-thumbnail wp-image-657" /></a>Loading dynamic data into an ordered- or unordered list cannot be simpler.</p>
<p>First we create a template for each LI row:</p>
<pre class="brush:html">var listRow = "&lt;li id=\"{0}\"&gt;{1}&lt;/li&gt;";</pre>
<p>Then we call the ajax method and handle the JSON results:</p>
<pre class="brush:html">// Now using my $.stringFormat method
// (see tag 'string format')
// we append the template with the correct values to the ul or ol
$.getJSON("http://somedomain/getsomedata", function(data, status) {
   $.each(data, function() {
   var listRowPopulated = $.stringFormat(listRow, [this.id, this.title]);
      $(listRowPopulated).appendTo("#someul");
    });
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marcdormey.com/index.php/archives/populating-a-ul-or-ol-list-via-json-result/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
