Checking styles before changing?
<p>I have a menu and I'm showing some content only if the user is on the home page. This condition runs every time any menu item is clicked. If the user clicks on the other menu items I do not want to display this content. I'm trying to prevent the JavaScript from having to go back and forth from the HTML. Is this excessive?</p>

<p>Example:</p>

<pre><code>if(pageNumber === home) {
    $('#content').css({'display':'block'});
} else if($('#content').css('display') !== 'none') {
    $('#content').css({'display':'none'});
}
</code></pre>
