<?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>My Science Is Better &#187; core js</title>
	<atom:link href="http://www.myscienceisbetter.info/tag/core-js/feed" rel="self" type="application/rss+xml" />
	<link>http://www.myscienceisbetter.info</link>
	<description></description>
	<lastBuildDate>Sat, 20 Mar 2010 16:16:09 +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>Timed cycling of DOM elements using Javascript</title>
		<link>http://www.myscienceisbetter.info/timed-cycling-of-dom-elements-using-javascript.html</link>
		<comments>http://www.myscienceisbetter.info/timed-cycling-of-dom-elements-using-javascript.html#comments</comments>
		<pubDate>Tue, 10 Mar 2009 13:19:00 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[core js]]></category>

		<guid isPermaLink="false">http://blog.myscienceisbetter.info/?p=30</guid>
		<description><![CDATA[I had the following sequence of code:

&#60;ul id=&#34;parent&#34;&#62;
    &#60;li&#62;test 1&#60;/li&#62;
    &#60;li&#62;test 2&#60;/li&#62;
    &#60;li&#62;test 3&#60;/li&#62;
    &#60;li&#62;test 4&#60;/li&#62;
    &#60;li&#62;test 5&#60;/li&#62;
&#60;/ul&#62;

What i wanted to achieve was to add the class "selected" to the childrens of #parent one at a time, having some delay [...]]]></description>
			<content:encoded><![CDATA[<p>I had the following sequence of code:</p>
<pre class="brush: xml;">
&lt;ul id=&quot;parent&quot;&gt;
    &lt;li&gt;test 1&lt;/li&gt;
    &lt;li&gt;test 2&lt;/li&gt;
    &lt;li&gt;test 3&lt;/li&gt;
    &lt;li&gt;test 4&lt;/li&gt;
    &lt;li&gt;test 5&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>What i wanted to achieve was to add the class "selected" to the childrens of #parent one at a time, having some delay in between. When then next element is selected, then the element before it should lose the selected class.</p>
<p>Based on the great work of <a href="http://www.webmasterworld.com/profilev4.cgi?action=view&amp;member=cmarshall" target="_blank">cmarshall</a> at http://www.webmasterworld.com/javascript/3449722.htm and adding a bit of jQuery i was able to build a page using jQuery that does that.</p>
<p>I didn't bother to put the all the code here, you can just view source in the demo. The code is pretty much commented so you shouldn't have any problem understanding it.</p>
<p>You can click <a href="http://www.myscienceisbetter.info/javascript-timed-event.html" target="_blank">here</a> to see it in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/timed-cycling-of-dom-elements-using-javascript.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
