📜  jQWidgets jqxLayout destroy() 方法(1)

📅  最后修改于: 2023-12-03 15:16:54.914000             🧑  作者: Mango

jQWidgets jqxLayout destroy() 方法

The jQWidgets jqxLayout destroy() method is used to remove the jqxLayout widget from the DOM. This method will also remove all child widgets that are associated with the jqxLayout widget.

Syntax
destroy(): void
Parameters

This method does not accept any parameters.

Return Value

This method does not return any value.

Description

The destroy() method in jQWidgets jqxLayout removes the widget from the DOM and its child widgets. This method should be used when you want to remove the jqxLayout widget completely from the page. Once this method is called, all references to the jqxLayout widget are lost, and you cannot access it using any method or property.

Example
HTML
<div id="jqxLayout">
    <div data-layout="left">Left Pane</div>
    <div data-layout="right">Right Pane</div>
    <div data-layout="center">Center Pane</div>
</div>
JavaScript
// Create jqxLayout object
var layout = $('#jqxLayout').jqxLayout({
    width: 600, 
    height: 400
});

// Destroy the jqxLayout widget
layout.jqxLayout('destroy');

In this example, we create a jqxLayout object and set its width and height. Then we call the destroy() method on the object to remove it from the DOM and all of its child widgets.