Javascript Abuse #2,463,981: Centering Content
Another quick rant/post about the wonderful world of abusing javascript. Consider the following code: function moveScreen() { var myWidth = 0, myHeight = 0; if (typeof(window.innerWidth) == ‘number’) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+ in ‘standards compliant mode’ myWidth = document.documentElement.clientWidth; myHeight […]