title: Using jquery to determine screen width
body: <p>Having trouble getting this script to run properly on an iphone 6. Keeps coming up as "not mobile". What am I missing?</p>
  
  <pre><code>$(document).ready(function(){
      if ($(window).width &lt; 700){
          alert("mobile");
      }
      else {
          alert("not mobile");
      }
  });
  </code></pre>
  
  <p>EDIT: apologies, the code I typed here had a typo, but was not the cause for my issue. I had inaccurate info on iphone resolution. Thanks everyone!</p>