<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: JavaScript Find Position</title>
	<link>http://blog.firetree.net/2005/07/04/javascript-find-position/</link>
	<description>Sharing useful things with the world.</description>
	<pubDate>Sun, 11 May 2008 22:30:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Eyal</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-24112</link>
		<dc:creator>Eyal</dc:creator>
		<pubDate>Wed, 21 Nov 2007 14:05:25 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-24112</guid>
		<description>&lt;p&gt;Hey, &lt;/p&gt;

&lt;p&gt;Tanks for the script.&lt;/p&gt;

&lt;p&gt;What about page with scroll , that causes the obj to dynamically
change it's position?&lt;/p&gt;

&lt;p&gt;Eyal&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey, </p>

<p>Tanks for the script.</p>

<p>What about page with scroll , that causes the obj to dynamically
change it&#8217;s position?</p>

<p>Eyal</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-24036</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 19 Nov 2007 19:56:04 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-24036</guid>
		<description>&lt;p&gt;Nope, this code fails for elements in relatively positioned parents, like tables. Nice try though.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nope, this code fails for elements in relatively positioned parents, like tables. Nice try though.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: shiva</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-23814</link>
		<dc:creator>shiva</dc:creator>
		<pubDate>Thu, 15 Nov 2007 06:35:39 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-23814</guid>
		<description>&lt;p&gt;thanks for this coding,
first its not working in mozila forefox n safari after adding the px its working fine,&lt;/p&gt;

&lt;p&gt;thanks for all :)&lt;/p&gt;

&lt;p&gt;Tom said,
15 August, 2006 @ 12:51 &lt;/p&gt;

&lt;p&gt;Tip from quirksmode site if you are trying to position an element using this script:&lt;/p&gt;

&lt;p&gt;â€œIn â€™strict modeâ€™ you must add â€˜pxâ€™ to the value, or Mozilla, Explorer on Mac and Safari will refuse to place the layer anywhere.â€&lt;/p&gt;

&lt;p&gt;example:&lt;/p&gt;

&lt;p&gt;document.getElementById( element2 ).style.left = findPosX( element1 ) + 'px';Great script by the way, thanks for the time saver.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>thanks for this coding,
first its not working in mozila forefox n safari after adding the px its working fine,</p>

<p>thanks for all :)</p>

<p>Tom said,
15 August, 2006 @ 12:51 </p>

<p>Tip from quirksmode site if you are trying to position an element using this script:</p>

<p>â€œIn â€™strict modeâ€™ you must add â€˜pxâ€™ to the value, or Mozilla, Explorer on Mac and Safari will refuse to place the layer anywhere.â€</p>

<p>example:</p>

<p>document.getElementById( element2 ).style.left = findPosX( element1 ) + &#8216;px&#8217;;Great script by the way, thanks for the time saver.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Infosgs</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-23243</link>
		<dc:creator>Infosgs</dc:creator>
		<pubDate>Sat, 03 Nov 2007 15:22:34 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-23243</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I'm using your script a lot and it goes but...&lt;/p&gt;

&lt;p&gt;Yesterday i've tried to find position of DIV element that was created after page load (Ajax environment), the problem is that this DIV have its origin (x=0 , y=0 , position=absolute) not to the window left-top corner, but at left-top corner of its parent that i call AjaxContainer.&lt;/p&gt;

&lt;p&gt;So, find position function retrieve DIV position into AjaxContainer how maximum parent.&lt;/p&gt;

&lt;p&gt;My scenario is BODY -&#62; ELEMENTS -&#62; AJAXCONTAINER (about in middle of page) -&#62; DIV.&lt;/p&gt;

&lt;p&gt;Anyone can help me?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>I&#8217;m using your script a lot and it goes but&#8230;</p>

<p>Yesterday i&#8217;ve tried to find position of DIV element that was created after page load (Ajax environment), the problem is that this DIV have its origin (x=0 , y=0 , position=absolute) not to the window left-top corner, but at left-top corner of its parent that i call AjaxContainer.</p>

<p>So, find position function retrieve DIV position into AjaxContainer how maximum parent.</p>

<p>My scenario is BODY -&gt; ELEMENTS -&gt; AJAXCONTAINER (about in middle of page) -&gt; DIV.</p>

<p>Anyone can help me?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Raja</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22984</link>
		<dc:creator>Raja</dc:creator>
		<pubDate>Fri, 26 Oct 2007 14:25:02 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22984</guid>
		<description>&lt;p&gt;Thanks for your coding&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for your coding</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22727</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Fri, 12 Oct 2007 12:58:16 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22727</guid>
		<description>&lt;p&gt;Hey this is really nice, very well written. I tried to search a lot for standard property to get x &#38; y position, but didn't get that. But this really helped me a lot. I appreciate a lot your work.&lt;/p&gt;

&lt;p&gt;Take care and congratulation.
Roshan&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey this is really nice, very well written. I tried to search a lot for standard property to get x &amp; y position, but didn&#8217;t get that. But this really helped me a lot. I appreciate a lot your work.</p>

<p>Take care and congratulation.
Roshan</p>]]></content:encoded>
	</item>
	<item>
		<title>By: montoto</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22596</link>
		<dc:creator>montoto</dc:creator>
		<pubDate>Wed, 03 Oct 2007 14:12:32 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-22596</guid>
		<description>&lt;p&gt;If you need to get the position of an element that may be inside a div with scroll content, then you should decrement the scrollTop or scrollLeft values of the element.
This is:
function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          curleft -+ obj.scrollLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>If you need to get the position of an element that may be inside a div with scroll content, then you should decrement the scrollTop or scrollLeft values of the element.
This is:
function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          curleft -+ obj.scrollLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Vishnu</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21799</link>
		<dc:creator>Vishnu</dc:creator>
		<pubDate>Fri, 24 Aug 2007 11:32:04 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21799</guid>
		<description>&lt;p&gt;This worked for me. Thank you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This worked for me. Thank you.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21753</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Wed, 22 Aug 2007 11:55:58 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21753</guid>
		<description>&lt;p&gt;Indeed a killer script!!! Good work Alex and God bless you Tom for correcting the formating issues.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Indeed a killer script!!! Good work Alex and God bless you Tom for correcting the formating issues.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: 16 Ð´ÐµÐ¹ÑÑ‚Ð²Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾ Ð¿Ð¾Ð»ÐµÐ·Ð½Ñ‹Ñ… Ñ€ÐµÑˆÐµÐ½Ð¸Ð¹ Ð´Ð»Ñ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½ÑÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</title>
		<link>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21530</link>
		<dc:creator>16 Ð´ÐµÐ¹ÑÑ‚Ð²Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾ Ð¿Ð¾Ð»ÐµÐ·Ð½Ñ‹Ñ… Ñ€ÐµÑˆÐµÐ½Ð¸Ð¹ Ð´Ð»Ñ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½ÑÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</dc:creator>
		<pubDate>Sun, 12 Aug 2007 14:01:00 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/04/javascript-find-position/#comment-21530</guid>
		<description>&lt;p&gt;[...] 8. ÐÐ°Ð±Ð¾Ñ€ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹, Ð¿Ð¾Ð·Ð²Ð¾Ð»ÑÑŽÑ‰Ð¸Ñ… Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ ÐºÐ¾Ð¾Ñ€Ð´Ð¸Ð½Ð°Ñ‚Ñ‹ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð° Ð½Ð° ÑÐºÑ€Ð°Ð½Ðµ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ. Ð•ÑÐ»Ð¸ Ð²Ð°Ñˆ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ ÑÑ‚Ð°Ñ‚Ð¸Ñ‡ÐµÐ½ Ð¾Ñ‚Ð½Ð¾ÑÐ¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾ Ð¾ÐºÐ½Ð° Ð¸ Ð½Ðµ Ð¸Ð¼ÐµÐµÑ‚ ÑÐºÑ€Ð¾Ð»Ð»Ð±Ð°Ñ€Ð¾Ð² - Ð»ÑƒÑ‡ÑˆÐµ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÑŒ Ñ„ÑƒÐ½ÐºÑ†Ð¸ÑŽ getPosition - Ñ‚Ð°Ðº Ð±ÑƒÐ´ÐµÑ‚ Ð±Ñ‹ÑÑ‚Ñ€ÐµÐµ. Ð’ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¼ ÑÐ»ÑƒÑ‡Ð°Ðµ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐ¹Ñ‚Ðµ getAlignedPosition - Ð¾Ð½Ð° ÑƒÑ‡Ð¸Ñ‚Ñ‹Ð²Ð°ÐµÑ‚ Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ ÑÐºÑ€Ð¾Ð»Ð»Ð±Ð°Ñ€Ð¾Ð². Ð¢Ð¾Ð»ÑŒÐºÐ¾ Ð¾Ð±Ñ€Ð°Ñ‚Ð¸Ñ‚Ðµ Ð²Ð½Ð¸Ð¼Ð°Ð½Ð¸Ðµ: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ top Ñƒ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð° Ð¼Ð¾Ð¶ÐµÑ‚ Ð±Ñ‹Ñ‚ÑŒ Ð¾Ñ€Ð¸Ñ†Ð°Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ð¼, ÐµÑÐ»Ð¸ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚ Ð²ÐµÑ€Ñ…Ð½ÐµÐ¹ Ñ‡Ð°ÑÑ‚ÑŒÑŽ Ð·Ð° Ð¿Ñ€ÐµÐ´ÐµÐ»Ð°Ð¼Ð¸ Ð¾ÐºÐ½Ð° - Ð´Ð»Ñ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ð¸ Ñ ÐºÑƒÑ€ÑÐ¾Ñ€Ð¾Ð¼ Ð¼Ñ‹ÑˆÐ¸ Ð¸Ð½Ð¾Ð³Ð´Ð° Ð½ÑƒÐ¶Ð½Ð¾ Ð¾Ð±Ð½ÑƒÐ»Ð¸Ñ‚ÑŒ Ð² ÑÑ‚Ð¾Ð¼ ÑÐ»ÑƒÑ‡Ð°Ðµ Ð²Ñ‹ÑÐ¾Ñ‚Ñƒ. ÐžÑÐ½Ð¾Ð²Ð½Ð¾Ð¹ ÑÐºÑ€Ð¸Ð¿Ñ‚ Ð¿Ð¾Ð·Ð°Ð¸Ð¼ÑÑ‚Ð²Ð¾Ð²Ð°Ð½ Ð¸Ð· Ð¾Ð´Ð½Ð¾Ð³Ð¾ Ð±Ð»Ð¾Ð³Ð°, Aligned-Ð²ÐµÑ€ÑÐ¸Ñ - Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚ Ð¿Ð¾Ð¸ÑÐºÐ¾Ð² Ð¿Ð¾ ÑÑƒÑÐµÐºÐ°Ð¼ Ð¸ ÑÐ¾Ð²Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ Ð¸Ð· Ð´Ð²ÑƒÑ… ÑÑ‚Ð°Ñ‚ÐµÐ¹ (Ð¿Ñ€Ð¸ Ð¾Ð±Ð½Ð°Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ð¸ DOCTYPE IE Ð²Ñ…Ð¾Ð´Ð¸Ñ‚ Ð² ÑÐ²Ð¾Ð¹ ÑÐ¾Ð±ÑÑ‚Ð²ÐµÐ½Ð½Ñ‹Ð¹, Ð½ÐµÑÐºÐ¾Ð»ÑŒÐºÐ¾ Ð½ÐµÐ¿Ñ€ÐµÐ´ÑÐºÐ°Ð·ÑƒÐµÐ¼Ñ‹Ð¹, Ñ€ÐµÐ¶Ð¸Ð¼). [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] 8. ÐÐ°Ð±Ð¾Ñ€ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹, Ð¿Ð¾Ð·Ð²Ð¾Ð»ÑÑŽÑ‰Ð¸Ñ… Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ ÐºÐ¾Ð¾Ñ€Ð´Ð¸Ð½Ð°Ñ‚Ñ‹ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð° Ð½Ð° ÑÐºÑ€Ð°Ð½Ðµ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ. Ð•ÑÐ»Ð¸ Ð²Ð°Ñˆ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ ÑÑ‚Ð°Ñ‚Ð¸Ñ‡ÐµÐ½ Ð¾Ñ‚Ð½Ð¾ÑÐ¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾ Ð¾ÐºÐ½Ð° Ð¸ Ð½Ðµ Ð¸Ð¼ÐµÐµÑ‚ ÑÐºÑ€Ð¾Ð»Ð»Ð±Ð°Ñ€Ð¾Ð² - Ð»ÑƒÑ‡ÑˆÐµ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÑŒ Ñ„ÑƒÐ½ÐºÑ†Ð¸ÑŽ getPosition - Ñ‚Ð°Ðº Ð±ÑƒÐ´ÐµÑ‚ Ð±Ñ‹ÑÑ‚Ñ€ÐµÐµ. Ð’ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¼ ÑÐ»ÑƒÑ‡Ð°Ðµ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐ¹Ñ‚Ðµ getAlignedPosition - Ð¾Ð½Ð° ÑƒÑ‡Ð¸Ñ‚Ñ‹Ð²Ð°ÐµÑ‚ Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ ÑÐºÑ€Ð¾Ð»Ð»Ð±Ð°Ñ€Ð¾Ð². Ð¢Ð¾Ð»ÑŒÐºÐ¾ Ð¾Ð±Ñ€Ð°Ñ‚Ð¸Ñ‚Ðµ Ð²Ð½Ð¸Ð¼Ð°Ð½Ð¸Ðµ: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ top Ñƒ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð° Ð¼Ð¾Ð¶ÐµÑ‚ Ð±Ñ‹Ñ‚ÑŒ Ð¾Ñ€Ð¸Ñ†Ð°Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ð¼, ÐµÑÐ»Ð¸ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚ Ð²ÐµÑ€Ñ…Ð½ÐµÐ¹ Ñ‡Ð°ÑÑ‚ÑŒÑŽ Ð·Ð° Ð¿Ñ€ÐµÐ´ÐµÐ»Ð°Ð¼Ð¸ Ð¾ÐºÐ½Ð° - Ð´Ð»Ñ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ð¸ Ñ ÐºÑƒÑ€ÑÐ¾Ñ€Ð¾Ð¼ Ð¼Ñ‹ÑˆÐ¸ Ð¸Ð½Ð¾Ð³Ð´Ð° Ð½ÑƒÐ¶Ð½Ð¾ Ð¾Ð±Ð½ÑƒÐ»Ð¸Ñ‚ÑŒ Ð² ÑÑ‚Ð¾Ð¼ ÑÐ»ÑƒÑ‡Ð°Ðµ Ð²Ñ‹ÑÐ¾Ñ‚Ñƒ. ÐžÑÐ½Ð¾Ð²Ð½Ð¾Ð¹ ÑÐºÑ€Ð¸Ð¿Ñ‚ Ð¿Ð¾Ð·Ð°Ð¸Ð¼ÑÑ‚Ð²Ð¾Ð²Ð°Ð½ Ð¸Ð· Ð¾Ð´Ð½Ð¾Ð³Ð¾ Ð±Ð»Ð¾Ð³Ð°, Aligned-Ð²ÐµÑ€ÑÐ¸Ñ - Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚ Ð¿Ð¾Ð¸ÑÐºÐ¾Ð² Ð¿Ð¾ ÑÑƒÑÐµÐºÐ°Ð¼ Ð¸ ÑÐ¾Ð²Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ Ð¸Ð· Ð´Ð²ÑƒÑ… ÑÑ‚Ð°Ñ‚ÐµÐ¹ (Ð¿Ñ€Ð¸ Ð¾Ð±Ð½Ð°Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ð¸ DOCTYPE IE Ð²Ñ…Ð¾Ð´Ð¸Ñ‚ Ð² ÑÐ²Ð¾Ð¹ ÑÐ¾Ð±ÑÑ‚Ð²ÐµÐ½Ð½Ñ‹Ð¹, Ð½ÐµÑÐºÐ¾Ð»ÑŒÐºÐ¾ Ð½ÐµÐ¿Ñ€ÐµÐ´ÑÐºÐ°Ð·ÑƒÐµÐ¼Ñ‹Ð¹, Ñ€ÐµÐ¶Ð¸Ð¼). [&#8230;]</p>]]></content:encoded>
	</item>
</channel>
</rss>
