<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Track Clicks Outside Active Elements with MooTools or&#160;jQuery</title> <atom:link href="http://davidwalsh.name/mootools-outter-click/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/mootools-outter-click</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Wed, 23 May 2012 14:01:31 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Dr.Death</title><link>http://davidwalsh.name/mootools-outter-click#comment-23633</link> <dc:creator>Dr.Death</dc:creator> <pubDate>Wed, 20 Apr 2011 11:06:10 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-23633</guid> <description>Still don&#039;t add &quot;outerclick&quot; event?</description> <content:encoded><![CDATA[<p>Still don&#8217;t add &#8220;outerclick&#8221; event?</p> ]]></content:encoded> </item> <item><title>By: Marcel</title><link>http://davidwalsh.name/mootools-outter-click#comment-17385</link> <dc:creator>Marcel</dc:creator> <pubDate>Sun, 02 May 2010 22:29:28 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-17385</guid> <description>Just wondering if you did create the custom event for MT...@David Walsh:</description> <content:encoded><![CDATA[<p>Just wondering if you did create the custom event for MT&#8230;</p><p>@David Walsh:</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/mootools-outter-click#comment-17289</link> <dc:creator>David Walsh</dc:creator> <pubDate>Tue, 27 Apr 2010 04:03:14 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-17289</guid> <description>@Kirill:  It would be the HTML tag, if anything...</description> <content:encoded><![CDATA[<p>@Kirill:  It would be the HTML tag, if anything&#8230;</p> ]]></content:encoded> </item> <item><title>By: Kirill</title><link>http://davidwalsh.name/mootools-outter-click#comment-17038</link> <dc:creator>Kirill</dc:creator> <pubDate>Wed, 14 Apr 2010 13:10:05 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-17038</guid> <description>Thanks! That really helped me. Thought I had to attach the click event to the window, because the body of the document doesn&#039;t always extends to the entire window.</description> <content:encoded><![CDATA[<p>Thanks! That really helped me. Thought I had to attach the click event to the window, because the body of the document doesn&#8217;t always extends to the entire window.</p> ]]></content:encoded> </item> <item><title>By: venu</title><link>http://davidwalsh.name/mootools-outter-click#comment-16622</link> <dc:creator>venu</dc:creator> <pubDate>Wed, 24 Mar 2010 23:28:42 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16622</guid> <description>@jamie:  yes iam also want to see the demo for this</description> <content:encoded><![CDATA[<p>@jamie:  yes iam also want to see the demo for this</p> ]]></content:encoded> </item> <item><title>By: hamburger</title><link>http://davidwalsh.name/mootools-outter-click#comment-16584</link> <dc:creator>hamburger</dc:creator> <pubDate>Sun, 21 Mar 2010 11:37:31 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16584</guid> <description>i did it like this:// if click outside the box .pop_dialog_table close it
$(document.body).addEvent(&#039;click&#039;,function(e) {
var x = $($pick(e.target,e.srcElement));
if(log.getStyle(&#039;opacity&#039;).toInt() == 1 &amp;&amp; !x.getParent(&#039;.pop_dialog_table&#039;))
{
log.fade(&#039;out&#039;);
}
});</description> <content:encoded><![CDATA[<p>i did it like this:</p><p> // if click outside the box .pop_dialog_table close it<br
/> $(document.body).addEvent(&#8216;click&#8217;,function(e) {<br
/> var x = $($pick(e.target,e.srcElement));<br
/> if(log.getStyle(&#8216;opacity&#8217;).toInt() == 1 &amp;&amp; !x.getParent(&#8216;.pop_dialog_table&#8217;))<br
/> {<br
/> log.fade(&#8216;out&#8217;);<br
/> }<br
/> });</p> ]]></content:encoded> </item> <item><title>By: Simon</title><link>http://davidwalsh.name/mootools-outter-click#comment-16557</link> <dc:creator>Simon</dc:creator> <pubDate>Fri, 19 Mar 2010 04:26:39 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16557</guid> <description>Argh your pesky head made me click the submit button before i finished writing that...The following is how I&#039;d typically determine if an event target lived inside of the parent.var parent = parentNode
check = e.target;
while (check &amp;&amp; check != parent) {
check = check.parentNode;
}It either winds up being null or the parent your looking for.So those are the two states your looking for.Never even knew MooTools had a .getParents() method.Will be interesting to see which one performs better.</description> <content:encoded><![CDATA[<p>Argh your pesky head made me click the submit button before i finished writing that&#8230;</p><p>The following is how I&#8217;d typically determine if an event target lived inside of the parent.</p><p>var parent = parentNode<br
/> check = e.target;<br
/> while (check &amp;&amp; check != parent) {<br
/> check = check.parentNode;<br
/> }</p><p>It either winds up being null or the parent your looking for.</p><p>So those are the two states your looking for.</p><p>Never even knew MooTools had a .getParents() method.</p><p>Will be interesting to see which one performs better.</p> ]]></content:encoded> </item> <item><title>By: Simon</title><link>http://davidwalsh.name/mootools-outter-click#comment-16556</link> <dc:creator>Simon</dc:creator> <pubDate>Fri, 19 Mar 2010 04:16:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16556</guid> <description>Very nice bro, I&#039;ve been using while loops in this format to do much the same thing for a while now for ordering visual sitemaps.// Bubble up to get the ROW that is hovered over
over = event.target;
while (over &amp;&amp; over.nodeName != this.options.childTag) {
over = over.parentNode;
}I will test out my class with your code VS the while loops and see which one is faster.</description> <content:encoded><![CDATA[<p>Very nice bro, I&#8217;ve been using while loops in this format to do much the same thing for a while now for ordering visual sitemaps.</p><p>// Bubble up to get the ROW that is hovered over<br
/> over = event.target;</p><p>while (over &amp;&amp; over.nodeName != this.options.childTag) {<br
/> over = over.parentNode;<br
/> }</p><p>I will test out my class with your code VS the while loops and see which one is faster.</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/mootools-outter-click#comment-16554</link> <dc:creator>David Walsh</dc:creator> <pubDate>Fri, 19 Mar 2010 01:33:09 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16554</guid> <description>@jamie:  http://davidwalsh.name/dw-content/twitter-dropdown-jquery.php@“Cowboy” Ben Alman:  I&#039;ll be creating the MooTools custom event this weekend.  Nice work on your jQuery version!</description> <content:encoded><![CDATA[<p>@jamie: <a
href="http://davidwalsh.name/dw-content/twitter-dropdown-jquery.php" rel="nofollow">http://davidwalsh.name/dw-content/twitter-dropdown-jquery.php</a></p><p>@“Cowboy” Ben Alman:  I&#8217;ll be creating the MooTools custom event this weekend.  Nice work on your jQuery version!</p> ]]></content:encoded> </item> <item><title>By: "Cowboy" Ben Alman</title><link>http://davidwalsh.name/mootools-outter-click#comment-16553</link> <dc:creator>"Cowboy" Ben Alman</dc:creator> <pubDate>Fri, 19 Mar 2010 00:49:46 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4934#comment-16553</guid> <description>@Sean O / @David Walsh: This approach (event delegation) is exactly the approach I took with my recently-released jQuery outside events plugin, except I used jQuery&#039;s own special events API to actually create a whole new, custom event for clickoutside that can be bound to and triggered using the standard jQuery events methods.In addition, I&#039;ve created an &quot;outside&quot; event for every native jQuery event that madee sense, as well as included a method to allow users to create their own. Feel free to check out the examples on the project page, on my site!http://benalman.com/projects/jquery-outside-events-plugin/</description> <content:encoded><![CDATA[<p>@Sean O / @David Walsh: This approach (event delegation) is exactly the approach I took with my recently-released jQuery outside events plugin, except I used jQuery&#8217;s own special events API to actually create a whole new, custom event for clickoutside that can be bound to and triggered using the standard jQuery events methods.</p><p>In addition, I&#8217;ve created an &#8220;outside&#8221; event for every native jQuery event that madee sense, as well as included a method to allow users to create their own. Feel free to check out the examples on the project page, on my site!</p><p><a
href="http://benalman.com/projects/jquery-outside-events-plugin/" rel="nofollow">http://benalman.com/projects/jquery-outside-events-plugin/</a></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 3/7 queries in 0.013 seconds using disk: basic
Object Caching 805/805 objects using disk: basic

Served from: davidwalsh.name @ 2012-05-23 10:13:36 -->
