Btw, Daniel, I have changed the API to accomodate this.

jQuery.plugin.add('name', func || objectOfFuncs), will now add a
static plugin and can be called like jQuery.name() or
jQuery.name().method1();

Static methods can be applied also by giving a static keyword with the
function name:

jQuery.plugin.add('name', {
    someInstanceMethod : fucntion() {},
    'static:myStaticMethod' : function() {}
});

then can be called: jQuery.name().someInstanceMethod() or
jQuery.name.myStaticMethod();

and

jQuery.fn.plugin.add('name', func || objectOfFuncs), will add it to
jQuery's prototype and can be called jQuery('selector').name().

jQuery.plugin.remove('name') and jQuery.fn.plugin.remove('name') work
in a similar way.

I'm putting together a full documentation and examples soon.

-Trey



On Mar 5, 1:34 pm, Daniel Friesen <[email protected]> wrote:
> I think it could do with the ability to handle methods on jQuery itself
> instead of being limited to just jQuery.fn, perhaps a second
> object/function to addPlugin;
>
> Likewise I'd prefer jQuery.options over jQuery.fn.options;
>
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
> -Nadir-Point & Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com)
> -MonkeyScript (http://monkeyscript.org)
> -Animepedia (http://anime.wikia.com)
> -Narutopedia (http://naruto.wikia.com)
> -Soul Eater Wiki (http://souleater.wikia.com)
>
> [email protected] wrote:
> > There has been a lot of activity about plugin authoring and how it can
> > be more structured and extensible. I've posted a couple of comments on
> > some threads and sent an email to John, but I thought I'd create a new
> > thread since I haven't had any feedback yet. John, I understand you
> > probably get a lot of email and are very busy.
>
> > I've written a plugin that I'd like to get feedback on from you guys.
> > It's still evolving, but should be stable in what it currently is
> > designed to do and I have found it invaluable when authoring larger,
> > more advanced plugins. It would be nice to see similar functionality
> > built into jQuery as I think others would also find it useful.
>
> > Link:http://plugins.jquery.com/project/plugin-authoring
>
> > Cheers,
> > Trey
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to