I'll be honest, and please don't take this as anything but
constructive criticism (which seemed to be a problem last "tutorial"
you posted

- Your sample plugin breaks the chain  (which is the whole power of
extending jQuery)
- You don't mention closures
- Nothing is gained by

# // jQuery.fn object
# jQuery.fn.first = function(message){
#     this.each(function(){
#         alert(message + " " + this.id);
#     });
# }

over

# function first($obj, message){
#     $obj.each(function(){
#         alert(message + " " + this.id);
#     });
# }

except the namespacing....  which "first" is a bad example of a
function name since that is a very common work plus is a selector
option (might seem confusing)


This tutorial is much more detailed and leaves me with a much better
sense of what is gained by a plugin

http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Again, as someone who helps out as much as i can on this mailing list,
the effort and purpose is nice, but so far they simply haven't really
shown anything new/useful




On Dec 23, 8:34 am, AdrianMG <yens...@gmail.com> wrote:
> Hi guys I continue posting tutorials about jQuery, this time it's a
> little introduction with 2 examples to create jQuery plugins, I hope
> you find it 
> useful!http://yensdesign.com/2008/12/how-to-create-a-plugin-for-jquery/

Reply via email to