Does a function inside jQuery constructor do anything different?
<p>I feel like I've only ever seen this here on SO, but I can't seem to find any documentation on it. The code I am talking about is stuff like this:</p>

<pre><code>$(function foo(){
    alert('foo');
});
</code></pre>

<p>Is there anything to that or is that just something that novices do because they think jQuery is a language? There is no scope change. It just seems completely unnecessary. Is there any method that you can invoke on this like:</p>

<pre><code>$(function foo(){ alert('foo'); }).someMethod();
</code></pre>

<p>The closest thing I can think of is <a href="http://api.jquery.com/jQuery.proxy/" rel="nofollow">$.proxy</a>, but that doesn't use this syntax. Am I right, is this completely unnecessary? </p>
