[jQuery] Plugin - internal functions

[jQuery] Plugin - internal functions

I was just reading about creating jquery plugins, when I noticed the following comment in the docs:
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">


If you need to write any private methods (ones that the end-coder
doesn't need to see), you can feel free to bind them to the $ object
itself, for example:



<pre>$.test = function() {
// Do some internal stuff
};
</pre>


You can then access it in the same manner:

<pre>$.test("some stuff");
</pre>

We recommend that you do it this way so that your code doesn't
accidentally overwrite any other functions that the user may be using.

</blockquote>
But if you see how <span id="site-slogan">Michael has written internal functions in his json plugin, he defines his internal functions inside the plugin function itself.
Would this not be the recommended way to write internal functions?
Regards
Ashutosh
</span>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/