title: JavaScript/jQuery: How to get actual original position of an element (DIV) after it's been rotated
body: <p>I have a div element that gets rotated with -webkit-transform: rotate(45deg). If I try to access it's current position after rotation like this</p>
  
  <pre><code>var x = $('#tap-area').offset().left;
  var y = $('#tap-area').offset().top;
  </code></pre>
  
  <p>it returns me not the actual values of where the original top left corner is, but where is the top left corner of the bounding box of the whole div (which is physically furthest top left, outside of the DIV).</p>
  
  <p>How can I calculate/get the original top left corner of the div after it gets rotated </p>
  
  <p>Eg:
  If I rotate it by 90deg, the value I would like to get now would be top right.
  If I rotate it by 180deg, the value I would like to get now would be bottom right.</p>
  
  <p>I need this, so I could set another DIV element to always stay attached to the original top left corner of the element, so that it would change it's position depending on how it was rotated.</p>
  
  <p>Thanks.</p>