I've attached a delegated event handler this way:
$('#static-div').on('click.myNamespace', '.attach-to-this', someFunction);
How do I then, later, reverse this action and remove all delegated events in that namespace? The static-div
element is always on the page and only its contents change.
I tried the following, but neither worked:
$('#static-div').off('myNamespace');
$('#static-div').off('myNamespace', '**');
I feel like this should be easier than it is....
Thanks.