Javascript plugins need deactivate/unbind functionality
Created by: martinstein
When building single-page applications (with Backbone, Knockout, ...), parts of the full HTML-page can get replaced with different content. In that case, you need to clear existing Javascript event handlers before removing the relevant elements from the DOM (otherwise there might be memory leaks).
I've had this problem with the tooltip
-plugin, but I think it applies to most Bootstrap plugins. Ideally, there should be something along the lines of:
$('#example').tooltip('deactivate')
or
$('#example').tooltip('unbind')
For clarification: I'm not talking about temporarily disabling the plugin. This is about completely removing the changes/handlers that each plugin has applied before.