.unbind() .unbind(type); .unbind(type, func);
Using .unbind(func); seams the most logical since the pattern looks like
you're just ommitting whatever you aren't specifying specifically.
What would "*.foo" do?
Though as for .bind("*", fn); I don't see how that could really be done.
There are dozens of event types, more being added, then there are custom
and namespaced events.
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
John Resig wrote:
> I remember someone mentioning something like:
> .unbind("*", fn)
>
> It could also apply to other things like:
> .unbind("*.foo", fn)
> .bind("*", fn)
>
> --John
>
>
> On Sat, Mar 21, 2009 at 6:16 PM, Daniel Friesen
> <[email protected]>wrote:
>
>
>> Originally the lead programmer wanted to avoid making the core of the
>> application dependent on any specific JavaScript framework. So I ended
>> up writing a small one. Now we're trying to migrate to one that can be
>> isolated nicely (jQuery) now that he's gone.
>>
>> Right now I'm picking at small differences (The framework I wrote was
>> actually inspired by jQuery) and finding various parts that can improve
>> jQuery, and things needing extensibility that get in the way of the
>> ability to cleanly use jQuery inside the app.
>>
>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
>>
>> Cloudream wrote:
>>
>>> +1
>>> And I wonder why you need your own framework :P
>>>
>>> On Sat, Mar 21, 2009 at 6:27 PM, Daniel Friesen
>>> <[email protected]>wrote:
>>>
>>>
>>>
>>>> When I wrote my framework at work with a .bind method similar to jQuery
>>>> I actually ended up adding another simple way to call it thinking jQuery
>>>> supported it.
>>>>
>>>> $(node).unbind(); // everything
>>>> $(node).unbind('type'); // all events of type
>>>> $(node).unbind('type', func); // just the func event on type
>>>> $(node).unbind(func); // func on all types; not supported by jQuery
>>>>
>>>> It's another useful call. I actually use it a fair bit at work since
>>>> it's about as short as helper methods:
>>>>
>>>> function someClickEventFunc() { ... }
>>>> $(node).click(someClickEventFunc);
>>>> $(node).unbind(someClickEventFunc);
>>>>
>>>> Worth an enhancement ticket?
>>>>
>>>> --
>>>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
>>>>
>>>>
>>>>
>>>>
>>>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---