Question: Having trouble getting this script to run properly on an iphone 6. Keeps coming up as "not mobile". What am I missing?

```
$(document).ready(function(){
    if ($(window).width < 700){
        alert("mobile");
    }
    else {
        alert("not mobile");
    }
});

```

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!

Answer: 
Well, ignoring [what ekuusela said](https://stackoverflow.com/a/29883354/1863564) about screen resolution, you seem to have forgotten your parentheses after `width`, which is a method, not a field. To fix this, just add `()` after it:

```
if ($(window).width() < 700)

```

See [the documentation for `width()`](https://api.jquery.com/width/) for more info.
iPhone6 screen is 1334x750 pixels.
If you only use the width to detect mobile user, see [this](https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device-in-jquery) instead.