Skip to content

Instantly share code, notes, and snippets.

View jermartin77's full-sized avatar

Jeremiah Martin jermartin77

View GitHub Profile
@jermartin77
jermartin77 / zr-detect
Last active August 29, 2015 14:20
Custom Detection Suite
var Browser: {
//holder for jQuery objects
$: {},
/*
detectTouch();
*/
detectTouch: function(){
@jermartin77
jermartin77 / screentool.js
Last active December 20, 2015 13:59
Screentool: Short self-invoking function to check on screen width and height as well as device dimensions and touch support. Add it to your development enivironment.
(function(){
var wWidth = document.body.clientWidth,
wHeight = window.innerHeight,
sWidth = screen.width,
sHeight = screen.height,
touch = 'ontouchstart' in window || 'onmsgesturechange' in window,
html = '<div id="stopen" style="line-height: 1em; font-weight: bold; padding: 10px;">?</div>' +
'<div id="ststats" style="display: none; width: 140px; padding: 10px;">' +
'Browser Width: <strong id="stwwidth">' + wWidth + '</strong><br>' +
'Browser Height: <strong id="stwheight">' + wHeight + '</strong><br>' +