What is the proper use of Jquery's $get to retrieve a control
<p>How might I reference a control in JQuery so that it wont throw an error if the control doesnt exist?</p>

<p>ie: this at the moment throws server error in asp.net</p>

<pre><code>if ($get('&lt;%= Panel1.ClientID %&gt;') != null) {   &lt;-- Fails with "The name 'Panel1' does not exist in the current context"
  $get('&lt;%= Panel1.ClientID %&gt;').scrollTop = yPos;
}
</code></pre>

<p>which is present in a master page, but for certain content pages will exist, in those cases I have code to reset the scroll position.</p>

<p>Thanks</p>
