How to eliminate unused arguments in an opacity fade?
<p><code>element</code> is called but never used, they are just passed back to a another function call.  This seems like a waste is there a better way to do this?</p>

<p><strong>Initial Call</strong></p>

<pre><code>fadeUp( document.getElementById( 'test' ), 3000 );
</code></pre>

<p><strong>Fades the opacity of an element up for 3000 ms</strong></p>

<pre><code>function fadeUp( element, max_time )
{
    var opacity = 0;
    if( fadeUp.elapsed === undefined )
    {
        fadeUp.elapsed = 0;
    }
    fadeUp.elapsed += 10;
    opacity = fadeUp.elapsed / max_time; 
    setTimeout(function(){callBack( element, max_time, fadeUp.elapsed, opacity );},fadeUp.elapsed);
}

function callBack( element, max_time, elapsed, opacity )
{
    element.style.opacity = opacity;
    if( elapsed &lt;= max_time )
    {
        fadeUp( element, max_time );
    }
    else
    {
        fadeUp.elapsed = undefined;
    }
}
</code></pre>

<p><strong>Related</strong></p>

<p><a href="http://stackoverflow.com/questions/9145809/how-can-i-vary-the-opacity-over-time">How to create an opacity fade()? (  improvement over jQuery)</a></p>
