Created
February 27, 2012 23:17
-
-
Save justmarkup/1927847 to your computer and use it in GitHub Desktop.
simple script for showing current screen width so you know where to set a breakpoint in your design
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
var developissimo = function() { | |
var devcon = document.createElement('div'), | |
devstyle = document.createElement('style'); | |
devcon.id = 'developissimo'; | |
devstyle.innerHTML = '#developissimo{position:absolute;top:0;right:0;z-index: 10000;padding:5px;background:#fff}'; | |
document.head.appendChild(devstyle); | |
devcon.innerHTML = window.innerWidth; | |
document.body.appendChild(devcon); | |
window.onresize = resize; | |
function resize () { | |
console.log('resize'); | |
devcon.innerHTML = window.innerWidth; | |
} | |
}; | |
developissimo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment