I think I agree with all of your points, a great list. I was wondering
if you could clarify:

> 3. Users should be able to over-ride defaults at the plugin level
> (true for all instances) or per-instance

Do you mean something like: .myplugin({ myprop: "override" }) where
passing in the option overrides it for that instance? (I think that's
what you meant, just wanted to clarify.)

> 5. No assumptions should be made about the user's environment. For
> example, don't blindly append newly created DOM elements to the body.

Do you mean in the sense that appending to the body is bad - or that
"body" is a static word and thus should be a mutable option in the
plugin (#8).

> 10. Pass in an {options} parameter instead of a hard-coded list of
> options

I think the corollary to this would be: If you start having optional
arguments you should really push your users towards using the
{options} object exclusively.

This gives a lot to work with, though. I think I'll probably do a
quick re-write of the jQuery.plugin stuff to try and codify some of
these notions.

--John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to