destroy

    Prepares the Slider for safe removal from the DOM.

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

    Example

    Open In Dojo
    <input id="slider" style="width: 300px" />
    <script>
      $("#slider").kendoSlider({
        precision: 4,
        smallStep:0.0001,
        largeStep:0.0001,
        min:0,
        max:0.0004,
        value: 0.0002,
        tooltip: {
          format: "{0:#,#.####}"
        }
      });
    
        // deatach events
    $("#slider").data("kendoSlider").destroy();
    
    // remove slider html from DOM
    $("#slider").closest(".k-slider").remove();
    
    </script>
    In this article