Alternative to offsetLeft and offsetTop?
<p>I wrote a little canvas application and finally tried to incorporate it into my blog, however now I find that on a mouse click offsetLeft and offsetRight are always 0.</p>

<p>I don't really know why, but how do I get that info back?</p>

<p>In case anyone is not seeing the tags on this post: yes I am using jQuery for mouse events.</p>

<pre><code>$('#'+canvasId).mousedown(function(e){

    that.mouse.down = true;
    that.mouse.downx = e.pageX-this.offsetLeft;
    that.mouse.downy = e.pageY-this.offsetTop;

    that.mouse.dialogDown = k.operations.interface.getHudItem(that.mouse.downx, that.mouse.downy);

    k.operations.interface.mouseDown(that.mouse.downx, that.mouse.downy);
});
</code></pre>
