webkit position() of offset() returning 0 when bound to click on image map "area"
So, it seems to work as expected in FF, but not Chrome, Safari or IE. I have an old site with image maps throughout the pages and whenever I try to get the position of the map you clicked on, it returns as 0 in any webkit browser.
Just something simple like this:
$('area').bind("click",function(){
alert($(this).position().left); // returns 0, but returns actual value in FF
});
If I use something like:
var xpos = $(this).parent().offset().left;
var ypos = $(this).parent().offset().top;
That gets me coordinates all over the place (like -1800 for ypos)
Any ideas to what could be happening?