title: How to get mouse position from a iframe that contains a page?
body: <p>I want to get mouse position from an IFRAME that contains a HTML page .
  But before Iframe HTML page load , this code work nice .
  After loading Iframe HTML page , this code don't work !
  Here is my code :</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Page Title&lt;/title&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;style&gt;
  #divid {
    height: 600px;
    width: 300px;
    border: 2px solid black;
    transform: scale(0.5, 0.5);
  }
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;iframe id="iframe" src="http://www.google.com/" &gt;
  &lt;/iframe&gt;
  
  
  
  &lt;script
                src="http://code.jquery.com/jquery-3.3.1.js"
                integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
                crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script&gt;
  var iframepos = $("#iframe").position();
  
  $('#iframe').contents().find('html').on('mousemove', function (e) {
      var x = e.clientX + iframepos.left;
      var y = e.clientY + iframepos.top;
      console.log(x + " " + y);
  })
      &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>can you help me please ?</p>