<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>Outer Thoughts &#187; JavaScript</title>
	<link>http://blog.outerthoughts.com</link>
	<description>&#62; From inner thoughts to the outer limits of Alexandre Rafalovitch</description>
	<pubDate>Sun, 20 Apr 2008 00:37:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>DOJO 1.0: Highlighting alternative table rows</title>
		<link>http://blog.outerthoughts.com/2007/12/dojo-10-highlighting-alternative-table-rows/</link>
		<comments>http://blog.outerthoughts.com/2007/12/dojo-10-highlighting-alternative-table-rows/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 16:38:16 +0000</pubDate>
		<dc:creator>Alexandre Rafalovitch</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[dojo]]></category>

		<guid isPermaLink="false">http://blog.outerthoughts.com/2007/12/dojo-10-highlighting-alternative-table-rows/</guid>
		<description><![CDATA[DOJO has hit 1.0 and changed a lot of things. So the documentation is still all over the place with examples using old syntax.
I am migrating to DOJO from jQuery, so just wanted to get basic dojo.query functionality to work. Specifically, I wanted to highlight alternative table rows.
Not easy! At least for a newbie. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dojotoolkit.org" title="Home of DOJO JavaScript toolkit">DOJO</a> has hit 1.0 and changed a lot of things. So the documentation is still all over the place with examples using old syntax.</p>
<p>I am migrating to DOJO from jQuery, so just wanted to get basic dojo.query functionality to work. Specifically, I wanted to highlight alternative table rows.</p>
<p>Not easy! At least for a newbie. I had to piece together 3 different documents and examples to figure out the easiest syntax.</p>
<blockquote>
<pre>&lt;script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript"&gt;
    dojo.addOnLoad(function(){
        dojo.query("table tbody tr:nth-child(odd)").addClass("even");
     });
&lt;/script&gt;</pre>
</blockquote>
<p>This highlights 1st, 3rd, 5th&#8230; rows in table body.  It is also possible to say <em>nth-child(3n+0)</em> to select every third row. However <em>nth-child(3n)</em> does not work, at least in 1.0.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.outerthoughts.com%2F2007%2F12%2Fdojo-10-highlighting-alternative-table-rows%2F';
  addthis_title  = 'DOJO+1.0%3A+Highlighting+alternative+table+rows';
  addthis_pub    = 'arafalov';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.outerthoughts.com/2007/12/dojo-10-highlighting-alternative-table-rows/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
