Created
July 19, 2012 13:17
-
-
Save jordanmoore/3143851 to your computer and use it in GitHub Desktop.
Current screen width indicator (useful for knowing when to add breakpoints when resizing browser window)
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
<script> | |
$(window).resize(function() { | |
var windowWidth = $(window).width(); | |
$('.screen-width').text(windowWidth + 'px'); | |
}); | |
</script> | |
<div id="debug" style="position:fixed;padding:0.3em 0.6em;background:#f1f1f1;font-size:0.6em;bottom:0;left:50%;"> | |
<span class="screen-width">0</span> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment