Is calling $find a relatively expensive operation?
<p>I am just wondering what the pros/cons would be between these two styles of coding:</p>

<pre><code>var foo;
$(document).ready( function() {
    foo = $find(fooID);
});

function OnBarClicked()
{
    foo.doStuff();
    foo.doMoreStuff();
}
</code></pre>

<p>compared to</p>

<pre><code>function OnBarClicked()
{
    $find(fooID).doStuff();
    $find(fooID).doMoreStuff();
}
</code></pre>

<p>I feel like there's probably a gotcha in the former, but I'm not aware of why there would be a gotcha. In addition, if there's any seek time for <code>$find()</code>.. is it more efficient to find all variables guaranteed to be 'found' 2+ times at the start, and then use the one instance?</p>

<p>EDIT: <a href="http://msdn.microsoft.com/en-us/library/bb397441.aspx" rel="nofollow">$find description and usage</a></p>

<pre><code>var radListBox1ID = "&lt;%= RadListBox1.ClientID %&gt;";
var radListBox = $find(radListBox1ID);
alert(radListBox.get_id()); //Alerts RadListBox1.ClientID
</code></pre>
