<?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: document.elementFromPoint &#8211; a jQuery solution</title>
	<atom:link href="http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/</link>
	<description>programming talk and more</description>
	<lastBuildDate>Thu, 03 May 2012 12:00:17 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: nickboss</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-1455</link>
		<dc:creator>nickboss</dc:creator>
		<pubDate>Sat, 11 Feb 2012 11:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-1455</guid>
		<description>Be carefull with IE8, because even if (x,y) is out of viewport, document.elementFromPoint will return a non null object (HtmlHTMLElement) and it will make the routine behave incorrectly.

In this case you can do this:

...
var doc;
if ((sl = $(document).scrollTop()) &gt;0)
      {
       doc = document.elementFromPoint(0, sl + $j(window).height() -1);
       if ( doc != null ) { if ( doc.tagName.toUpperCase() == &#039;HTML&#039; ) doc = null; }
       isRelative = ( doc == null );
      }
      else if((sl = $(document).scrollLeft()) &gt;0)
      {
       doc = document.elementFromPoint(sl + $(window).width() -1, 0);
       if ( doc != null ) { if ( doc.tagName.toUpperCase() == &#039;HTML&#039; ) doc = null; }
       isRelative = ( doc == null );
      }
...</description>
		<content:encoded><![CDATA[<p>Be carefull with IE8, because even if (x,y) is out of viewport, document.elementFromPoint will return a non null object (HtmlHTMLElement) and it will make the routine behave incorrectly.</p>
<p>In this case you can do this:</p>
<p>&#8230;<br />
var doc;<br />
if ((sl = $(document).scrollTop()) &gt;0)<br />
      {<br />
       doc = document.elementFromPoint(0, sl + $j(window).height() -1);<br />
       if ( doc != null ) { if ( doc.tagName.toUpperCase() == &#8216;HTML&#8217; ) doc = null; }<br />
       isRelative = ( doc == null );<br />
      }<br />
      else if((sl = $(document).scrollLeft()) &gt;0)<br />
      {<br />
       doc = document.elementFromPoint(sl + $(window).width() -1, 0);<br />
       if ( doc != null ) { if ( doc.tagName.toUpperCase() == &#8216;HTML&#8217; ) doc = null; }<br />
       isRelative = ( doc == null );<br />
      }<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-647</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 01 Nov 2011 15:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-647</guid>
		<description>thanks for the hint alexey !</description>
		<content:encoded><![CDATA[<p>thanks for the hint alexey !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: angelo</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-601</link>
		<dc:creator>angelo</dc:creator>
		<pubDate>Wed, 26 Oct 2011 10:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-601</guid>
		<description>that was really helpful</description>
		<content:encoded><![CDATA[<p>that was really helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Kruchinin</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-508</link>
		<dc:creator>Alexey Kruchinin</dc:creator>
		<pubDate>Sat, 01 Oct 2011 22:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-508</guid>
		<description>There&#039;s a typo in the code
&quot;$.elementFromPoint : function(x,y)&quot;
should be
&quot;$.elementFromPoint = function(x,y)&quot;</description>
		<content:encoded><![CDATA[<p>There&#8217;s a typo in the code<br />
&#8220;$.elementFromPoint : function(x,y)&#8221;<br />
should be<br />
&#8220;$.elementFromPoint = function(x,y)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: javierfp</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-375</link>
		<dc:creator>javierfp</dc:creator>
		<pubDate>Tue, 19 Apr 2011 14:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-375</guid>
		<description>Really helpful!</description>
		<content:encoded><![CDATA[<p>Really helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik Hjelte</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-338</link>
		<dc:creator>Henrik Hjelte</dc:creator>
		<pubDate>Sat, 22 Jan 2011 14:52:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-338</guid>
		<description>Smart, very useful.</description>
		<content:encoded><![CDATA[<p>Smart, very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo Pradipta</title>
		<link>http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/comment-page-1/#comment-333</link>
		<dc:creator>Leo Pradipta</dc:creator>
		<pubDate>Tue, 18 Jan 2011 06:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/#comment-333</guid>
		<description>Good Explanation... Good Topic...</description>
		<content:encoded><![CDATA[<p>Good Explanation&#8230; Good Topic&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

