title: Do something if screen width is less than 960 px
body: <p>How can I make jQuery do something if my screen width is less than 960 pixels? The code below always fires the 2nd alert, regardless of my window size: </p>
  
  <pre><code>if (screen.width &lt; 960) {
      alert('Less than 960');
  }
  else {
  
      alert('More than 960');
  }
  </code></pre>