diff options
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r-- | lib/scripts/script.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index e05aeb0fe..87fd8e503 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -41,6 +41,16 @@ function $() { } /** + * Simple function to check if a global var is defined + * + * @author Kae Verens + * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 + */ +function isset(varname){ + return(typeof(window[varname])!='undefined'); +} + +/** * Get the X offset of the top left corner of the given object * * @link http://www.quirksmode.org/index.html?/js/findpos.html |