var namespaces = type.split(".");
type = namespaces.shift();
var all = !namespaces.length,
- namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)"),
+ namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join("\\.(?:.*\\.)?") + "(\\.|$)"),
special = this.special[ type ] || {};
if ( events[ type ] ) {
// Cache this now, all = true means, any handler
all = !namespaces.length && !event.exclusive;
- var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)");
+ var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
jQuery("#firstp").bind("click.test.abc",function(e){
check("click.test.abc", "Namespaced click triggered");
});
+
+ // Those would not trigger/unbind (#5303)
+ jQuery("#firstp").trigger("click.a.test");
+ jQuery("#firstp").unbind("click.a.test");
// Trigger both bound fn (1)
jQuery("#firstp").trigger("click.test.abc");