title: How to disable a JavaScript, with inner window width
body: <p>The page I am working on has a tilt effect, which affects the orientation of the site body. I want to turn this off when the page reaches a mobile viewport; I have looked and tried a few thing but can't seem to get the effect I want. The code below is what i am using. This script runs separate from my main JS code.</p>
  
  <pre><code>window.addEventListener("mousemove",function(e) {
  
    var width = window.innerWidth;
    var height = window.innerHeight;
    var clientHeight = document.body.clientHeight;
    var skew = {};
    skew.y = (20 * ((e.x / width) - 0.5));
    skew.x = -(20 * ((e.y / height) - 0.5));
  
    document.body.style.webkitTransform = "perspective("+clientHeight+"px) rotateX("+skew.x+"deg) rotateY("+skew.y+"deg)";
  
  });
  </code></pre>