title: jQuery - get click position in a jqueryUI dialog
body: <p>How can i catch the correct click position?</p>
  
  <p>I have a self-made context-menu that I want to raise on the click position.
  The click is on a DOMelement in a <code>jQueryUI.dialog()</code> object.
  When i try, i gives me the wrong (for my use) coordinates. </p>
  
  <p>Javascript:</p>
  
  <pre><code>$("a").on("contextmenu", function(eve){
    $("#contextmenu").show().css({
       left: eve.pageX,
       top: eve.pageY
    });
  });
  
  
  &lt;div class="im-the-dialog"&gt;
      &lt;div class="60% width"&gt;some content&lt;/div&gt;
      &lt;div&gt;
          &lt;ul&gt;
              &lt;li&gt;
                  &lt;a class="clicked"&gt;click&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div class="the context menu"&gt;some links&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>how can i fix it?</p>