Skip to content

Instantly share code, notes, and snippets.

@jordanmoore
Created July 19, 2012 13:17
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save jordanmoore/3143851 to your computer and use it in GitHub Desktop.
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)
<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