<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Cross-browser div focus and blur</title>
	<atom:link href="http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/</link>
	<description>Music, Programming, Design</description>
	<lastBuildDate>Sat, 04 Feb 2012 10:19:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mohsen</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-1277</link>
		<dc:creator>Mohsen</dc:creator>
		<pubDate>Wed, 03 Aug 2011 05:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-1277</guid>
		<description>Awsome!!
It saved me. I do it by Prototype and it works great.
Thanks.</description>
		<content:encoded><![CDATA[<p>Awsome!!<br />
It saved me. I do it by Prototype and it works great.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: caolvchong</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-1220</link>
		<dc:creator>caolvchong</dc:creator>
		<pubDate>Fri, 03 Sep 2010 02:00:27 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-1220</guid>
		<description>Thanks. Safari also support tabIndex on my PC.
Safari version:4.0.3,  Windows XP.</description>
		<content:encoded><![CDATA[<p>Thanks. Safari also support tabIndex on my PC.<br />
Safari version:4.0.3,  Windows XP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Nemeti</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-1195</link>
		<dc:creator>Andrei Nemeti</dc:creator>
		<pubDate>Mon, 12 Apr 2010 07:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-1195</guid>
		<description>Thanks. Helped with my simple task.
Josh Habdas is right. It won&#039;t validate, but as long as we have to hack IE, let&#039;s just assume it&#039;s valid :)</description>
		<content:encoded><![CDATA[<p>Thanks. Helped with my simple task.<br />
Josh Habdas is right. It won&#8217;t validate, but as long as we have to hack IE, let&#8217;s just assume it&#8217;s valid <img src='http://www.barryvan.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry van Oudtshoorn</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-963</link>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
		<pubDate>Fri, 16 Oct 2009 00:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-963</guid>
		<description>@bluerouse: In that case, you&#039;re probably better off using Javascript that doesn&#039;t rely on the &#039;focus&#039; and &#039;blur&#039; events.

A MooTools snippet that adds the &#039;outerClick&#039; event to elements is here: http://blog.kassens.net/outerclick-event .

Using this, you could rewrite the example like this -- note that, as I tend to nowadays, I&#039;ll just create the elements in JavaScript:

&lt;pre&gt;
$(document.body).adopt(
	new Element(&#039;div&#039;).addEvents(
		&#039;outerClick&#039;: function() {
			$(&#039;monkey&#039;).setStyle(&#039;display&#039;, &#039;none&#039;);
		},
		&#039;click&#039;: function() {
			$(&#039;monkey&#039;).setStyle(&#039;display&#039;, &#039;block&#039;);
		}
	),
	new Element(&#039;div&#039;, {
		&#039;id&#039;: &#039;monkey&#039;,
		&#039;styles&#039;: {
			&#039;display&#039;: &#039;none&#039;
		}
	})
)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@bluerouse: In that case, you&#8217;re probably better off using Javascript that doesn&#8217;t rely on the &#8216;focus&#8217; and &#8216;blur&#8217; events.</p>
<p>A MooTools snippet that adds the &#8216;outerClick&#8217; event to elements is here: <a href="http://blog.kassens.net/outerclick-event" rel="nofollow">http://blog.kassens.net/outerclick-event</a> .</p>
<p>Using this, you could rewrite the example like this &#8212; note that, as I tend to nowadays, I&#8217;ll just create the elements in JavaScript:</p>
<pre>
$(document.body).adopt(
	new Element('div').addEvents(
		'outerClick': function() {
			$('monkey').setStyle('display', 'none');
		},
		'click': function() {
			$('monkey').setStyle('display', 'block');
		}
	),
	new Element('div', {
		'id': 'monkey',
		'styles': {
			'display': 'none'
		}
	})
)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: bluerouse</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-960</link>
		<dc:creator>bluerouse</dc:creator>
		<pubDate>Thu, 15 Oct 2009 13:25:57 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-960</guid>
		<description>Nice approach!
But: Whats to do if you got a link in the &#039;monkey&#039;-Div? You can&#039;t click it, because the Blur-Event is before the Click-Event...

You got an idea?</description>
		<content:encoded><![CDATA[<p>Nice approach!<br />
But: Whats to do if you got a link in the &#8216;monkey&#8217;-Div? You can&#8217;t click it, because the Blur-Event is before the Click-Event&#8230;</p>
<p>You got an idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry van Oudtshoorn</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-844</link>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
		<pubDate>Fri, 13 Mar 2009 02:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-844</guid>
		<description>You&#039;re right, Josh. This is, unfortunately, a hack more than it is the &#039;correct&#039; way of doing things. But it works nevertheless. :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re right, Josh. This is, unfortunately, a hack more than it is the &#8216;correct&#8217; way of doing things. But it works nevertheless. <img src='http://www.barryvan.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Habdas</title>
		<link>http://www.barryvan.com.au/2009/01/onfocus-and-onblur-for-divs-in-fx/comment-page-1/#comment-843</link>
		<dc:creator>Josh Habdas</dc:creator>
		<pubDate>Thu, 12 Mar 2009 08:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=66#comment-843</guid>
		<description>Thanks for the idea. Only problem is that tabindex is not a valid attribute of the DIV element as per the HTML 4 spec: http://www.w3.org/TR/REC-html40/index/attributes.html.</description>
		<content:encoded><![CDATA[<p>Thanks for the idea. Only problem is that tabindex is not a valid attribute of the DIV element as per the HTML 4 spec: <a href="http://www.w3.org/TR/REC-html40/index/attributes.html" rel="nofollow">http://www.w3.org/TR/REC-html40/index/attributes.html</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

