/ Published in: JavaScript
URL: http://fromvega.com/wordpress/2007/07/14/easydrag-jquery-plugin/#comment-754
Returns absolute position of given object. Specially for crap-IE that do not detects correctly the .offset* attribute.
Expand |
Embed | Plain Text
function getPos (obj) { var output = new Object(); var mytop=0, myleft=0; while( obj) { mytop+= obj.offsetTop; myleft+= obj.offsetLeft; obj= obj.offsetParent; } output.left = myleft; output.top = mytop; return output; }
You need to login to post a comment.
