destroy

Prepares the RangeSlider for safe removal from the DOM.

Detaches event handlers and removes data entries in order to avoid memory leaks.

Example

<div id="rangeslider" style="width: 200px;">
    <input />
    <input />
</div>
<script>
    $(document).ready(function() {
        $("#rangeslider").kendoRangeSlider();
        var rangeSlider = $("#rangeslider").getKendoRangeSlider();

    $("#rangeslider").data("kendoRangeSlider").destroy();

    // remove slider html from DOM
    $("#rangeslider").closest(".k-slider").remove();
    });
</script>
In this article