Created
April 25, 2012 15:09
-
-
Save JDMcKinstry/2490456 to your computer and use it in GitHub Desktop.
Simple code snippet to add a .position func to the window object
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
| if (!window.position) { | |
| window.position = function() { | |
| return (navigator.appName.toLowerCase().indexOf("explorer") >= 0) ? { x: window.screenLeft, y: window.screenTop } : { x: window.screenX, y: window.screenY }; | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment