19-05-2011, 04:14 AM
Salut,
la réponse est dans la doc :
Source : http://api.jquery.com/unbind/
la réponse est dans la doc :
Citation :Using Namespaces
Instead of maintaining references to handlers in order to unbind them, we can namespace the events and use this capability to narrow the scope of our unbinding actions. As shown in the discussion for the .bind() method, namespaces are defined by using a period (.) character when binding a handler:
$('#foo').bind('click.myEvents', handler);
When a handler is bound in this fashion, we can still unbind it the normal way:
$('#foo').unbind('click');
However, if we want to avoid affecting other handlers, we can be more specific:
$('#foo').unbind('click.myEvents');
Source : http://api.jquery.com/unbind/