OMG!! Could it be??! No! It can't! Its, its, its BBBEEENNNN NAAADDDEELLL!
Hell has frozen over!
Ben Nadel wrote:
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
--
BrightLight Development, LLC.
954-775-1111 (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com