Mercurial > projects > dang
view docs/candydoc/util.js @ 209:42e663451371
Renamed some of the actions. Declarations now have it's own action.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 12 Aug 2008 19:05:17 +0200 |
parents | d3c148ca429b |
children |
line wrap: on
line source
/* This file is a part of CanDyDOC fileset. File is written by Victor Nakoryakov and placed into the public domain. This file is javascript with cross-browser utility functions. */ function getLeft(elem) { var ret = 0; while (elem.offsetParent) { ret += elem.offsetLeft; elem = elem.offsetParent; } return ret; } function getTop(elem) { var ret = 0; while (elem.offsetParent) { ret += elem.offsetTop; elem = elem.offsetParent; } return ret; } function getWindowHeight() { var ret = 0; if (typeof(window.innerHeight) == "number") ret = window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) ret = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) ret = document.body.clientHeight; return ret; }