Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -----------
- // Debugger that shows view port size. Helps when making responsive designs.
- // -----------
- function showViewPortSize(display) {
- if(display) {
- //var height = jQuery(window).height();
- var width = jQuery(window).width();
- jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;background:#ddd;top:48px;right:0;color:black;padding:1px 2px">'+width+'</div>');
- jQuery(window).resize(function() {
- //height = jQuery(window).height();
- width = jQuery(window).width();
- jQuery('#viewportsize').html(width+"");
- });
- }
- }
- showViewPortSize(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement