title: Condition based on if mobile or otherwise unknown browser
body: <p>I have a form that shrinks responsively based on the window size. However, we need it to permanently stay small on mobile and otherwise unknown browsers.</p>
  
  <p>This is the psuedocode. jQuery is fine, too, and I'm using v.1.8</p>
  
  <pre><code>if ( is_desktop )
      is_narrow = false;
  else
      // applies to mobile and unknown browsers
      is_narrow = true;
  
  $( "#form" ).toggleClass( 'narrow', is_narrow );
  </code></pre>
  
  <p>Most of the solutions out there fail on unknown browsers. For example, they only detect if the browser is mobile, and assume it is a desktop otherwise. I need to assume mobile unless proven to be a desktop browser.</p>
  
  <p>P.S., I'm also using PHP if you want to offer a solution in that instead.</p>