<?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>Rexxars.com &#187; forge</title>
	<atom:link href="http://rexxars.com/tag/forge/feed/" rel="self" type="application/rss+xml" />
	<link>http://rexxars.com</link>
	<description>A developers perspective on PHP, Android, Mootools, Node.JS and other awesomeness.</description>
	<lastBuildDate>Tue, 08 Nov 2011 15:33:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>MooTools IdleTimer</title>
		<link>http://rexxars.com/mootools/idletimer/</link>
		<comments>http://rexxars.com/mootools/idletimer/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 10:30:29 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Mootools]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[forge]]></category>
		<category><![CDATA[idletimer]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=81</guid>
		<description><![CDATA[Have you ever wanted to log a user out of your site if he is inactive for a given amount of time? Create a better user experience by dimming or hiding page elements while the user is watching a video? A couple of months ago I came across Nick Zakas&#8217; YUI approach to this problem, [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to log a user out of your site if he is inactive for a given amount of time?<br />
Create a better user experience by dimming or hiding page elements while the user is watching a video?</p>
<p><img class="alignright" title="Mootools IdleTimer" src="http://rexxars.com/project/idletimer/title.png" alt="" width="185" height="78" /></p>
<p>A couple of months ago I came across Nick Zakas&#8217; <a href="http://www.nczonline.net/blog/2009/06/02/detecting-if-the-user-is-idle-with-javascript-and-yui-3/">YUI approach</a> to this problem, and recently I found Paul Irish&#8217;s <a href="http://paulirish.com/2009/jquery-idletimer-plugin/">jQuery plugin</a> which was based on Nick&#8217;s work.</p>
<p>This is my attempt at creating a Mootools class that uses the same approach. Quite simply, it fires a timer that activates a callback after a given amount of time. The timer is reset if the user moves the mouse, presses a key, scrolls using the scroll wheel or clicks any mouse button. This has to be done over the active document, obviously.</p>
<p>Key features:</p>
<ul>
<li>Can be attached to a single element on the page or the entire document/window.</li>
<li>Lets you set up multiple instances with different timeouts and events.</li>
<li>Easily retrieve the idle status from the instance using the isIdle property.</li>
<li>Find the number of milliseconds since the user was last active.</li>
<li>Allows you to call the active() method to manually reset the idle state &#8211; useful for Flash and other overlays that lets you communicate with Javascript.</li>
<li>Easily retrieve an IdleTimer instance using element.get(&#8216;idle&#8217;, { options });</li>
<li>Free and open source. MIT-licensed.</li>
</ul>
<p>Check out the <a href="http://rexxars.com/project/idletimer/">demo page</a> for more details. The source is available on <a href="http://github.com/rexxars/IdleTimer">Github</a> as well as in the recently opened <a href="http://mootools.net/forge/">MooTools Forge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/mootools/idletimer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

