JSFiddle - React, Tailwind, and code Playground

by dixalex

JavaScript

//Forced Portait Simulation for Mobile
//Alexander Dixon [10-13-2015]
//http://stackoverflow.com/questions/8030449/how-can-i-scale-element-height-and-width-using-css
//http://stackoverflow.com/questions/4917664/detect-viewport-orientation-if-orientation-is-portrait-display-alert-message-ad
//S3270008/00/findabilityLT_2

if ($('#MobileTrue').length > 0) {
    if (window.innerWidth > window.innerHeight) {
        var widthResize = (window.innerHeight * 1) + "px",
            heightResize = (window.innerWidth * 1) + "px";
    }
}

var widthSniffer = function ForcePortait() {
    //if(($('#MobileTrue').length > 0) && ($('#rrImageMap').length > 0)) {
    if (($('#MobileTrue').length > 0)) {
        if (window.innerWidth > window.innerHeight) {
            $('div#rrSurveyContainer').css("width", widthResize).css("float", "left");
            $('div.rrQuestionContainer').css("zoom", "0.35").css("-moz-transform", "scale(0.35)");
        } else {
            $('div#rrSurveyContainer, div.rrQuestionContainer').css("width", heightResize);
            $('div#rrOuterSurveyContainer').css("float", "none");
            $('div.rrQuestionContainer').css("zoom", "1.0").css("-moz-transform", "scale(1.0)");
        }
    }
};
setInterval(widthSniffer, 500);