Created
March 17, 2014 02:34
-
-
Save zhuzhuaicoding/9593019 to your computer and use it in GitHub Desktop.
getPos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getPos(obj){var obj1=obj2=obj;var l=obj.offsetLeft;var t=obj.offsetTop;while(obj1=obj1.offsetParent) | |
| l+=obj1.offsetLeft;while(obj2=obj2.offsetParent) | |
| t+=obj2.offsetTop;var rg=QZFL.dom.getPosition(obj);return{top:t,left:l,width:rg.width,height:rg.height}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment