'jQuery' is the object itself, a function. 'jQuery.fn' is its prototype.
every jquery object inherits the prototype methods, so u'll need to
extend the .fn, not the object itself (it would be like adding static
stuff to a class).
On Mon, Oct 20, 2008 at 10:04 AM, Reinaldo JuniorZ <[EMAIL PROTECTED]> wrote:
>
> I'm having a lot of fun extending jQuery, but some thing looks much obscure.
>
> One of them is why i need to use
>
> jQuery.fn.extend({
> 'myPlugin': function(opts) { ... }
> })
>
> And why it will not work if I just make something like
>
> jQuery.myPlugin = function(opts) { ... }
>
>
> Any help?
>
> --
> Reinaldo de Souza "JuniorZ"
> http://reinaldojunior.net
>
> -- Non ducor, duco
>
> >
>
--
E. Myller ( www.emyller.net )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---