Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6666 closed bug (worksforme)

jQuery Namespaced Events Don't Trigger More General, Non-namespaced Handlers

Reported by: bundini Owned by:
Priority: Milestone: 1.4.3
Component: event Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

Simple test:

jQuery(document).bind('namespace',function(){ alert('triggered');});

jQuery(document).trigger('namespace.test');

I expect to see the alert box. Maybe my interpretation of the way these should behave is wrong.

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Component: unfiledevent
Resolution: worksforme
Status: newclosed

Think of the "namespaced" events like CSS classes. What you have as "namespace" there is an event. The trigger is only triggering events named "namespace" that also are ".test". There aren't any.

This is best discussed on the forum rather than the bug tracker.

Note: See TracTickets for help on using tickets.