destroy
Prepares the Upload for a safe removal from the DOM. Detaches all event handlers and removes the jQuery.data
attributes to avoid memory leaks. Calls the destroy
method of any child Kendo UI widget.
The
destroy
method does not remove the Upload element from the DOM.
Example
<input type="file" name="files" id="upload" />
<script>
$("#upload").kendoUpload({
select: function () {
//sample event
}
});
var upload = $("#upload").data("kendoUpload");
// Detaches events and prepares for a safe removal
upload.destroy();
</script>