values of the corners of the div
finding the four values of the corners 开发者_开发技巧of the div area
relative to the document:
var offset = $('#div').offset();
var x1 = offset.left;
var y1 = offset.top;
var x2 = x1 + $('#div').width();
var y2 = y2 + $('#div').height();
精彩评论