When to use $.extend({...})?
<p>my question is when do i should use $.extend(...) ?<br/>
In many jquery plugins i see that the jquery-object itself is extended with new (global) functions:</p>

<pre><code>$.extend({
    doSth: function() {
        alert('do sth here');
    }
}
</code></pre>

<p>What are the advantages of extending the jquery-object instead of creating a global object containing the function:</p>

<pre><code>var myLib = {
    doSth: function() {
        alert('do sth here');
    }
}
</code></pre>

<p>Currently i am developing a small js-lib. In that lib the $.fn-object is extended and i need some global functions.<br />But i don't know where to put the global functions: in my own lib-object or in the jquery-object?</p>

<p>Best Regards,<br/>
Biggie</p>
