Hi,
my question is when do i should use $.extend(...) ?
In many jquery plugins i see that the jquery-object itself is extended with new (global) functions:
$.extend({
doSth: function() {
alert('do sth here');
}
}
What are the advantages of extending the jquery-object instead of creating a global object containing the function:
var myLib = {
doSth: function() {
alert('do sth here');
}
}
Currently i am developing a small js-lib. In that lib the $.fn-object is extended and i need some global functions.
But i don't know where to put the global functions: in my own lib-object or in the jquery-object?
Best Regards,
Biggie