title: How to detect window size and then do something with jquery switch statement
body: <p>i would like to check for the window size with jquery and based on the different resolutions i would like to change the background image. So i was thinking to somehow use the "switch" statement for more cases, but i just don't know how this would look like. This is the basic structure i want but with more options: </p>
  
  <pre><code>if ((screen.width&gt;=1024) &amp;&amp; (screen.height&gt;=768)) {
   //do something
  }
  else {
  //do something else
  }
  </code></pre>
  
  <p>Thanks for your help.</p>