title: jquery addclass to body tag
body: <p>The following script is within a div, does this matter? As it doesn't work. Is the syntax right? Do I need to tell jquery to go up a level in the DOM first? how would I do this?</p>
  
  <pre><code>        $(document).ready(function() {
            $('body').addClass('diary');
          });    
  </code></pre>
  
  <p>Thanks guys.</p>
  
  <p>Here is the relevant section in the HTML:</p>
  
  <pre><code>&lt;body&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>  &lt;header&gt;
      &lt;div class="logo"&gt;
        &lt;a href=""&gt;&lt;/a&gt;
      &lt;/div&gt;  
      &lt;nav class="main-nav"&gt;
        &lt;a class="first" href="http://www.adrianwaddingham.com"&gt;HOME&lt;/a&gt;
        &lt;a class="second" href="/sheriff"&gt;SHERIFF&lt;/a&gt;
        &lt;a class="third" href="/biography"&gt;BIOGRAPHY&lt;/a&gt;
        &lt;a class="fourth" href="/contact"&gt;CONTACT&lt;/a&gt;     
        &lt;a class="fifth" href="/diary"&gt;DIARY&lt;/a&gt;     
  
      &lt;/nav&gt;
  
    &lt;/header&gt;
  
  &lt;script&gt;
          $(document).ready(function() {
            $('body').addClass('diary');
          });    
  &lt;/script&gt;
  
  
  &lt;section class="copy-main"&gt;
    &lt;article&gt;
  </code></pre>