Created
July 24, 2012 06:56
-
-
Save riix/3168477 to your computer and use it in GitHub Desktop.
Detecting and logging browser dimensions
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 winWidth = $(window).width(); | |
var winHeight = $(window).height(); | |
$('#log').append('<div><h1>' + winWidth + 'x' + winHeight + '@' + window.orientation + '</h1></div>'); | |
$(window).resize(function() { | |
var winWidth = $(window).width(); | |
var winHeight = $(window).height(); | |
$('#log').append('<div><h1>' + winWidth + 'x' + winHeight + '@' + window.orientation + '</h1></div>'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment