how to know the the objects x and y position in web page
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1101292/how-to-get-the-top-position-of-an-element">How to get the top position of an element?</a>  </p>
</blockquote>



<p>i am just wondering how to know the correct position of an object in the webpage.  I try to solve this doubt myself. But i am not able to solve. In other language like AS3, there is x and y properties are there to know the position. but using java script or j query, i do not know how to do this.</p>

<p>here is little bit of code to start :
i want to know the container object's x and y position.</p>

<pre><code>$(function(){
  var myObject = $('#container');
  var objectXpos;
  var objectYpos;
});
</code></pre>

<p>thanks, naresh kumar.</p>
