Thanks Mike! My vote is to expose the selector and context on the jQuery object as properties and leave this as an "official" plugin ... at least for now.
John, what are your thoughts about adding the selector and context properties to jQuery? I know this isn't the first time I've wanted to get the selector used via a plugin. I think it could open the doors for some more creative plugins. If you are okay with adding these in, I can go ahead and clean up the code for behavior, commit it and the additions to jQuery. Of course the current version of behavior could work for people not able to immediately upgrade to 1.1.3 (once it is finally released). -- Brandon Aaron On 4/30/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
Brandon, This is really, really cool! I think this is functionality that belongs in core as it solves an extremely common use case (and addresses the most commonly asked question regarding ajax usage). Awesome job! Mike > Okay ... I've created a jQuery.fn.behavior() and > jQuery.fn.unbehavior(). I haven't checked anything in yet but I have > uploaded it to here: > http://brandon.jquery.com/plugins/behavior/test/test.html > > I also added a pretty rough $.behavior.find() so that unbehavior will work. > > The only extension I needed to make to the core was exposing the > selector and context for the jQuery object.