Skip to content

Instantly share code, notes, and snippets.

@ZachMoreno
Created May 2, 2013 02:59
Show Gist options
  • Select an option

  • Save ZachMoreno/5499874 to your computer and use it in GitHub Desktop.

Select an option

Save ZachMoreno/5499874 to your computer and use it in GitHub Desktop.
Screen Dimensions Tool by: Jon Nutting
<!----------------------------------->
<!-- Insert Screen Dimensions Tool -->
<!--- Code Doodle by Jon Nutting ---->
<!----------------------------------->
<script>
$(function(){
$("body").append('<div id="screenDims">Resize Window ></div>');
$("#screenDims").css({
'position':'absolute',
'bottom':0,
'right':0,
'background-color':'#eaeaea',
'padding':'5px'
});
$(window).on("resize", function(){
$('#screenDims').text('H: ' +$(window).height()+ ' / W: ' + $(window).width());
});
});
</script>
<!----------------------------------->
<!---- END: Screen Dimensions Tool -->
<!----------------------------------->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment