Removing multiple namespaced event handlers

Removing multiple namespaced event handlers

Hello all,
Please, I would like to know how efficient it is to do this:

suppose I have a div with id: "target", and I have a click handler attached to it like this:

  1. $('#target').on('click.uds', function(){ });

which of the following code will be more efficient in removing the event handler:

  1. $('*').off('.uds');

or

  1. $('#target').off('click.uds');

I initially thought the 1st was better since it does not have to search through the entire DOM. But then, I might be wrong