title: How get real positions of element in javascript
body: <p><img src="https://i.stack.imgur.com/3NHnP.png" alt="enter image description here"></p>
  
  <p>I want to get real X and Y position of my styled elements in javascript ( or jquery short code).</p>
  
  <pre><code>var offset = obj.offset();
    ox=offset['left']; 
    oy=offset['top']; 
  
    px=parseInt(obj.css('padding-left')); // padding left
    py=parseInt(obj.css('padding-top')); // padding top
    bx=parseInt(obj.css('border-width') ); // stroke value
    ox=ox+px+bx;
    oy=oy+py+bx;
  </code></pre>
  
  <p>But this codes sometimes not work..</p>
  
  <p>when scrool top or scroll left change im not get real position :(</p>
  
  <p>please help me..</p>