Bind to all namespaces of custom jquery event

Bind to all namespaces of custom jquery event

I would like a way to bind to all namespaces of an event or effectively ignore that the event is namespaced.

$('#test').on('custom', function(){ ... });

$('#test').trigger('custom.namespace1');
$('#test').trigger('custom.namespace2');

The fired event of 'custom' will not be caught because it is namespaced. Something like binding to custom.* would be very useful in order to bind to all events of type custom, regardless of namespace.

Stackoverflow thread that prompted this post: