title: javascript change body ID (with css) dynamically with respect to browser window size
body: <p>Here is what I have, but it is not working:</p>
  
  <pre><code> if(window.width() &lt; 1000)
  document.getElementsByTagName('body')[0].id="be"
  else
  document.getElementsByTagName('body')[0].id="bd"
  ;
  </code></pre>
  
  <p>Please tell me what I am writing wrong. Please don't tell other solutions, please just fix this code.</p>
  
  <p>Basically, I want to give a different ID to the BODY tag of a website if the browser window size is less than 1000px.</p>