title: How to correctly get mouse coordinates with JavaScript without JQuery?
body: <p>I am aware of the fact that variations of that question were asked many times before. Looking through Google output I found pages with examples like that:</p>
  
  <pre><code>function point_it(event) {
  pos_x = event.offsetX ? (event.offsetX) : event.pageX - document.getElementById("pointer_div").offsetLeft;
  pos_y = event.offsetY ? (event.offsetY) : event.pageY - document.getElementById("pointer_div").offsetTop;
  document.pointform.form_x.value = pos_x;
  document.pointform.form_y.value = pos_y;
  }
  </code></pre>
  
  <p>The code works, but when I look at 
  <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/offsetX" rel="nofollow"> MouseEvent.offsetX</a> it says "This is an experimental technology...".</p>
  
  <p>So my question is, is it save to use the above construction or not? Is it better to learn how to use JQuery? </p>