Is there a \"global\" unbind function in jQuery, such that I\'d be able to remove all bound events from a given namespace? eg:
// assume these are the events bou
You should add a class within the bind function
$('#foo').bind('click.myNS', ...).addClass('removeLater');
$('#bar').bind('keyup.myNS', ...).addClass('removeLater');
$('#baz').bind('dblclick.myNS', ...).addClass('removeLater');
and afterwards
$('.removeLater').unbind();
If #foo
#bar
and #etc
are all the same element or small set of them, you could also do:
$('div, button').unbind();
but if you have a bound event you don't want to remove that wouldn't be a good idea