Error using clientY when vertical scrollbar exists
<p>I am trying to popup a div whenever a span with id <code>toolpopup</code> is clicked (div should appear at those coordinates) and it works fine for the spans which are at the top of the page. But when i scroll down and click the span the div is created but not at the desired coordinates. What could be possibly wrong? I am trying it on <code>Firefox 7.0.1</code></p>

<pre><code>$("#toolpopup").live("click", function(event) {
    var X = event.clientX;
    var Y = event.clientY;
    $("#popup").css('position', 'absolute');
    $("#popup").css("top", Y);
    $("#popup").css("left", X);
    $("#popup").css("display","block");
});
</code></pre>
