Created
July 9, 2012 00:42
-
-
Save pitch-gist/3073581 to your computer and use it in GitHub Desktop.
JavaScript: Display Screen Width
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
// write the current screen width to our screen | |
$("#widget span").html($(window).width()); | |
$(window).resize(function() { | |
$("#widget span").html($(window).width()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment