Controls might have an optional method destroy. If this method is present, it is called before snippet's content is being replaced, allowing to destroy any previously initialized JS. This method is only called on snippets, where content is being replaced; when append or prepend operation is used, method is not called as in that case, previously initialized JS content remains intact in those snippets.
Control
s might have an optional methoddestroy
. If this method is present, it is called before snippet's content is being replaced, allowing to destroy any previously initialized JS. This method is only called on snippets, where content is being replaced; whenappend
orprepend
operation is used, method is not called as in that case, previously initialized JS content remains intact in those snippets.