Skip to content
Related Articles

Related Articles

jQWidgets jqxDocking disableWindowResize() Method

Improve Article
Save Article
  • Last Updated : 05 Nov, 2021
Improve Article
Save 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 jqxDocking is used for representing a widget to manage multiple windows and also the layout of a web page. Here each window in the specified jqxDocking can do multiple tasks such as it can be dragged around the Web page, docked into docking zones, removed from the docking, collapsed into a minimized state for hiding its content, and also can be expanded for displaying its content.

The disableWindowResize() method is used for disabling the resizing of a specific window of the specified jqxDocking.

Syntax:

$('#jqxDocking').jqxDocking(
    'disableWindowResize', 'windowId');

Parameters: This method accepts a parameter that is illustrated below:

  • windowId: This is the id of a window whose resizing is being disabled.

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/jqxdocking.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxwindow.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqx-all.js”></script>

Example: The below example illustrates the jQWidgets jqxDocking disableWindowResize() Method.

HTML




<!DOCTYPE html>
<html lang="en">
  
<head>
    <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/jqxdocking.js">
    </script>
    <script type="text/javascript" 
            src="jqwidgets/jqx-all.js">
    </script>
</head>
  
<body>
    <center>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
        <h3>
            jQWidgets jqxDocking disableWindowResize() Method
        </h3>
        <div id="jqx_Docking" style="margin: 25px;" 
             align="left">
            <div>
                <div id="Window">
                    <div>Window</div>
                    <div>
                        <h8>Content for the window</h8>
                        <ul>
                            <li>GFG</li>
                            <li>CSE</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <input type="button" style="margin: 29px;" 
               id="jqxbutton_for_disableWindowResize"
          value="Disable the resizing of the above window"/>
        <div id="log"></div>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#jqx_Docking").jqxDocking({
                    width: 250,
                    windowsMode: {
                        'Window': 'floating'
                    }
                });
                $("#jqxbutton_for_disableWindowResize").
                    jqxButton({
                        width: 350
                    });
                $('#jqx_Docking').jqxDocking(
                    'enableWindowResize', 'Window');
                $('#jqxbutton_for_disableWindowResize').on(
                    'click', function () {
                        $('#jqx_Docking').jqxDocking(
                            'disableWindowResize', 'Window');
                    });
            });
        </script>
    </center>
</body>
  
</html>


Output:

Reference: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxnavigationbar/jquery-navigationbar-api.htm?search=


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!