ryanwelcher
11/14/2017 - 1:31 PM

JS mobile helpers

JS mobile helpers

var helpers = {};

// Detect screen sizes and type
helpers.isMobile = function() {
	return ( window.innerWidth <= 768 );
};

helpers.isTablet = function() {
	return window.innerWidth < 1024;
};

helpers.isLandscape = function() {
	return $windowWidth > $windowHeight;
};

helpers.isBigPortrait = function() {
	return ( $windowWidth - 300 < $windowHeight ) && !isTablet();
};