Open In App
Related Articles

jQWidgets jqxToolBar destroy() Method

Improve Article
Save Article
Like Article

jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxToolBar is used to illustrate a jQuery widget that shows a toolbar where various tools can be spontaneously appended. Moreover, by default the jqxToolBar favor some widgets namely jqxButton, jqxToggleButton, jqxDropDownList, jqxComboBox as well as jqxInput. However, the custom tools can also be appended.

The destroy() method is used to destroy the displayed jqxToolBar as well as its all the tools. It has no parameters and does not return anything.



Linked Files: Download  from the given link. In the HTML file, locate the script files in the downloaded folder.

<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxscrollbar.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxlistbox.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdropdownlist.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcombobox.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxinput.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxtoolbar.js”></script>

The below example illustrates the jqxToolBar destroy() method in jQWidgets.



<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet"
          type="text/css" />
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript"
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript"
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript"
        <h1 style="color:green">
        <h3>jQWidgets jqxToolBar destroy() method</h3>
        <div id="jqxtb"></div>
            <input type="button" id="jqxBtn" 
                   style="margin-top: 25px" 
                   value="Click here" />
        <div id="log"></div>
    <script type="text/javascript">
        $(document).ready(function () {
                width: "470px",
                theme: "energyblue",
                height: 70,
                tools: "button button | dropdownlist combobox | input",
                    function (type, index, tool, menuToolIninitialization) {
                        switch (index) {
                            case 0:
                            case 1:
                            case 2:
                                    width: 100,
                                    source: ["Java", "Scala", "C++"],
                                    selectedIndex: 2
                            case 3:
                                    width: 60,
                                    source: [4, 5, 8, 10, 15],
                                    selectedIndex: 3
                            case 4:
                                    width: 140,
                                    placeHolder: "Search..."
                width: "140px",
                height: "30px",
            $("#jqxBtn").on("click", function () {
                $('#log').text("Toolbar destroyed!")



Last Updated : 28 Nov, 2021
Like Article
Save Article
Similar Reads
Related Tutorials