Why is this script failing to run?
<p>For whatever reason ths works when run from console:</p>

<pre><code>var wh=window.innerHeight;
var h= wh-345;
$('.hidehome').attr('style', 'display:block;height:'+h+'px;width:100%');
</code></pre>

<p>but this doesn't:</p>

<pre><code>$(document).ready(function() {
var wh=window.innerHeight;
var h= wh-345;
$('.hidehome').attr('style', 'display:block;height:'+h+'px;width:100%'); )};
</code></pre>

<p>I have no idea why. Console tells me </p>

<pre><code>Syntax error at line 4: expected expression, got ')'
h+'px;width:100%'); )};
--------------------^
</code></pre>

<p>Which obviously means something is wrong with my code, but I still can't figure it out.</p>
