website/assets/js/detectmobile.js

11 lines
371 B
JavaScript
Raw Permalink Normal View History

2020-07-08 20:24:13 +02:00
// set isportrait var
isportrait = $(window).height() > $(window).width();
if (isportrait === true) {
var desktop = document.getElementById('style_desktop');
desktop.disabled = true;
desktop.parentNode.removeChild(desktop);
} else {
var sheet = document.getElementById('style_mobile');
sheet.disabled = true;
sheet.parentNode.removeChild(sheet);
}