Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

jQWidgets jqxDraw clear() Method

Improve Article
Save Article
Like Article
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 jqxDraw is a small jQuery-based plugin that is used to draw shapes and texts using VML, SVG and HTML5.

The clear() method is used for clearing the content of the specified jqxDraw widget.



Parameters: This method does not accept any parameters.

Return values: This method does not return any values.

Linked Files: Download jQWidgets 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.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdraw.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqx-all.js”></script>

Example: The below example illustrates the jQWidgets jqxDraw clear() Method.


<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" href=
        "jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
        <h1 style="color:green;">
        <h3>jQWidgets jqxDraw clear() Method</h3>
        <div id="jqx_Draw" style=
            "height:200px; width:280px;">
        <input type="button" id="Button_for_clear" 
            style="padding:5px 15px; margin-top:40px;"
            value="Clear the content of the widget">
        <script type="text/javascript">
            $(document).ready(function () {
                    renderEngine: 'HTML5'
                var Instance = $('#jqx_Draw').jqxDraw('getInstance');
      , 100, 65, { fill: 'green' });
                $("#Button_for_clear").click(function () {


jQWidgets jqxDraw clear() Method

jQWidgets jqxDraw clear() Method


My Personal Notes arrow_drop_up
Last Updated : 26 Jan, 2022
Like Article
Save Article
Similar Reads
Related Tutorials