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?
$(document).ready(function() {
$('body').addClass('diary');
});
Thanks guys.
Here is the relevant section in the HTML:
<body>
<header>
<div class="logo">
<a href=""></a>
</div>
<nav class="main-nav">
<a class="first" href="http://www.adrianwaddingham.com">HOME</a>
<a class="second" href="/sheriff">SHERIFF</a>
<a class="third" href="/biography">BIOGRAPHY</a>
<a class="fourth" href="/contact">CONTACT</a>
<a class="fifth" href="/diary">DIARY</a>
</nav>
</header>
<script>
$(document).ready(function() {
$('body').addClass('diary');
});
</script>
<section class="copy-main">
<article>