Hey Ben,

That all looks really good, and it's fun to play with!

People on this list who are not familiar with your coding style will probably 
trip out on its "verticality", since because of jQuery's chainability, it tends 
to get quite horizontal.

It would be cool if you added a little "got me!" alert if the user is able to 
click on the button (that happens sometimes when it doesn't jump away very far).

-- Josh
  ----- Original Message ----- 
  From: Ben Nadel 
  To: [email protected] 
  Sent: Monday, July 02, 2007 3:00 PM
  Subject: [jQuery] jQuery plugin architecture info


  Hey all, I am really starting to get into programming some jQuery stuff. I 
love what I see so far, but I want to get into programming some plugins. I have 
read the getting started with plugin info on the jQuery site and I am slowly 
coming around. I have thrown together my first plugin, which seems to work, but 
I wanted to get some feedback on it: 

  http://www.bennadel.com/blog/800-My-First-jQuery-Plugin.htm

  The way it works is the function defined event handlers in the THIS scope of 
the jQuery object. Then, it binds events to those already-defined methods (as 
the event handlers). I am not sure if this is good to do because it alters the 
structure of the jQuery object itself. However, I am hesitant to define an 
anonymous function inside of the BIND methods as that will duplicate the event 
handler for each element in the jQuery stack (which seems hugely wasteful, 
unless I am totally missing something). 

  This seemed like the best way to get around not having a prototype method 
shared among all the jQuery stack elements.

  Thanks. Please let me know if I am WAAAY off base or maybe on the right 
track. All feedback is appreciated. jQuery rocks :) 

  -Ben
  -- 
  Ben Nadel
  Certified Advanced ColdFusion Developer
  http://www.bennadel.com 

Reply via email to