title: Javascript mobile detection
body: <p>I am trying to make a javascript alert box that asks the user if he would like to go to the mobile page or not. 
  Right now I have this code :</p>
  
  <pre><code>if (screen.width &lt;= 699) {
     alert document.location = "/mobile";
  }
  else {
       alert ("Thanks!");
  }
  </code></pre>