How to get top/left x/y of image map with javascript / jquery?
Posted
by jpea
on Stack Overflow
See other posts from Stack Overflow
or by jpea
Published on 2010-04-02T15:15:23Z
Indexed on
2010/04/02
15:23 UTC
Read the original article
Hit count: 118
Using jQuery's position() or offset(), I can't seeme to get the top/left coordinates of an image map area. It works in FF, but nothing else - no webkit, IE, Opera.
$('area').bind("click",function(){
alert($(this).position().left);
});
<area shape="rect" coords="14,25,205,150" href="#">
Anyone know of a different way to access these? Normally I would just take the coords and split(",") but there are a bunch of multi-faceted area's on these pages.
© Stack Overflow or respective owner