cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              //=============================================
//              PRINT WINDOW SIZE             =
//=============================================
var windowSizePrint = function(argument) {
  var windowWidth = $(window).width();
  var windowHeight = $(window).height();
  if (!$("#window-size-info").length) {
    $('body').append('<div id="window-size-info"><div><span class="w"></span> X <span class="h"></span></div><style type="text/css">#window-size-info{z-index:9999999;position:fixed;right:0px;bottom:100px;padding:3px 8px;font-family:"Open Sans","Lato",Tahoma;font-size:15px;color:#fff;background-color:#000;box-shadow:0 0 0 2px#fff;}</style></div>');
  }
  $('#window-size-info span.w').text(windowWidth);
  $('#window-size-info span.h').text(windowHeight);
}
$(document).ready(windowSizePrint);
$(window).load(windowSizePrint);
$(window).resize(windowSizePrint);
//-------  End of print window size  --------//

//////////////////////
// browser function //
//////////////////////
var nua = navigator.userAgent;
window.nua = nua;
var browser = {
  nua     : nua,
  html    : $('html').attr('class'),
  webkit  : /webkit/gi.test(nua),
  gecko   : /gecko/gi.test(nua),
  mobile  : /Mobile/gi.test(nua),
  windows : /Windows/gi.test(nua),
  chrome  : /Chrome/gi.test(nua),
  firefox : /Firefox/gi.test(nua),
  apple   : /Safari/gi.test(nua),
  ipod    : /iPod/gi.test(nua),
  iphone  : /iPhone/gi.test(nua),
  ipad    : /iPad/gi.test(nua),
  android : /Android/gi.test(nua),
  androidVersion: /Android/gi.test(nua) ? nua.match(/Android ([0-9\.]+);/)[1] : "",
  ie      : /MSIE/gi.test(nua),
  ie10    : /MSIE 10/gi.test(nua),
  ie9     : /MSIE 9/gi.test(nua),
  ie8     : /MSIE 8/gi.test(nua),
  ie7     : /MSIE 7/gi.test(nua),
  ie6     : /MSIE 6/gi.test(nua),
  tablet  : $(window).width() >= 768 && /Mobile/gi.test(nua),
  desktop : $(window).width() >= 972 && !/Mobile/gi.test(nua),
  phone   : $(window).width() < 768 && /Mobile/gi.test(nua),
};
window.browser = browser;
console.groupCollapsed("browser variables");
var browserVariables = "";
for (var prop in browser) {
  if (browser.hasOwnProperty(prop)) {
    console.log(prop + " : " + browser[prop]);
    browserVariables += prop + " : " + browser[prop] + "\n";
  }
}
console.groupEnd();
$(function() {
  $("#window-size-info > div").attr("title", browserVariables);
});
            
          
!
999px
Loading ..................

Console