Proper way to call `setTimeout()`
<p>I am working on a project at the moment and need to call the <code>setTimeout()</code> function. I can't use libraries so must be "pure" JavaScript and work in all browsers IE6+ or IE7+ at a push.</p>

<p>I can successfully call <code>setTimeout()</code> like this:</p>

<pre><code>setTimeout("setOpacity('" + elementId + "'," + opacity + ")", 1000);
</code></pre>

<p>and it works as expected, but its string evaluation and I can just image in the future doing one with far more variables and it not working so want to get the technique down now.</p>

<p>I did try the following:</p>

<pre><code>setTimeout(function () { setOpacity(elementId, opacity); }, 1000);
</code></pre>

<p>but instead of it doing the timeout, it executed straight away.</p>

<p>Is it possible to call <code>setTimeout()</code> here without using string evaluation?</p>
