When i use $().bind to bind a event handler of two event type at one
time like this:
        var o = $("#myObj");
        o.bind("mouseover.a.b mouseout.a.c", function(){});
then handler registrations of the two types of event in the $.cache
use the same handler, and its type is set to the last type, that is
"a.c". And then ".b" will not match the Regex.
So, if i call o.unbind(".b") later, it wont remove the handler of
mouseover event.
As we can see, In the version 1.3.1 source code, $.event.add function
is:
                ......
                jQuery.each(types.split(/\s+/), function(index, type) {
                        // Namespaced event handlers
                        var namespaces = type.split(".");
                        type = namespaces.shift();
// same handler, but its type may be set for many times, and is
finally set to the last type.
                        handler.type = namespaces.slice().sort().join(".");
                        ......
                }
                ......
I think that the handle function should be wrapped every time the loop
runs. but i'm not sure if it affects anything else.
Sorry for my poor English...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to