Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Current screen width indicator (useful for knowing when to add breakpoints when resizing browser window)
$(window).resize(function() {
var windowWidth = $(window).width();
$('.screen-width').text(windowWidth + 'px');
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment