var offset = $(".a1").offset(); var w = $(window); alert("(x,y): ("+(offset.left-w.scrollLeft())+","+(offset.top-w.scrollTop())+")");