This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.outside = function(ename, cb){ | |
return this.each(function(){ | |
var $this = $(this), | |
self = this; | |
$(document.body).bind(ename, function tempo(e){ | |
if(e.target !== self && !$.contains(self, e.target)){ | |
cb.apply(self, [e]); | |
if(!self.parentNode) $(document.body).unbind(ename, tempo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** Only use in case of hardcode | |
** We use max-aspect-ratio and not orientation: portrait because when an input get focused, the mq its disabled | |
** The site content needs to be wrapped in main-wrapper and main-wrapper--content | |
** The JS is to fix the weird vh behaviour in Chrome Android | |
*/ | |
/* CSS */ | |
/* @media screen and (min-aspect-ratio: 13/9){ } // landscape */ | |
/* @media screen and (max-aspect-ratio: 13/9){ } // portrait */ |