title: jQuery positioning with CSS3 "transform: scale"
body: <p>jQuery doesn't work well with CSS "transform: scale()"
  (however with "transform: translate()" it works fine)</p>
  
  <p>Please take a look at this simple example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
  
    $('#root').dblclick(function() {
      $('#box').position({
        my: 'right bottom',
        at: 'right bottom',
        of: $('#root')
      });
    })
  
    $('#box').draggable({
      containment: $('#root'),
    });
  
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    position: relative;
    margin: 0;
  }
  #root {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 500px;
    height: 500px;
    border: solid 2px red;
    transform-origin: 0 0 0;
    transform: scale(0.5);
  }
  #box {
    position: absolute;
    top: 100px;
    left: 50px;
    display: inline-block;
    width: 50px;
    height: 50px;
    background: red;
    border: solid 1px black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"&gt;&lt;/script&gt;
  
  drag red box :)
  &lt;br/&gt;double click in square to position box
  &lt;div id="root"&gt;
    &lt;div id="box"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Root node has to be scaled, becouse in my real app I use fullscreen mode and I need to fit content to window resolution.
  But when I scale parent element, jQuery UI draggable and jQuery position doesn't work properly.</p>
  
  <p>Of course the question is how to make it work properly?</p>
  
  <p>There are many similar question, but I didn't find proper answer.</p>