Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery EasyUI Window Plugin - Window

jQuery EasyUI Window Plugin - Window


jQuery EasyUI Plugins jQuery EasyUI Plugins


Extends $.fn.panel.defaults. Override the defaults through $.fn.window.defaults.

A window is a floating, draggable panel that can be used as an application window. By default, a window is movable, resizable, and closable. Its content can be defined with static HTML or loaded dynamically via ajax.

Depends on

Usage

Creating a Window

1. Create a window from markup.



Window Content

2. Create a window using JavaScript.





$('#win').window({

    width:600,

    height:400,

    modal:true

});

3. Create a window through compound layout.

As usual, you can define a window layout. The example below shows how to split a window region into two parts: north and center.



        
        
            The Content.         

Window Actions

Opens and closes a window.



$('#win').window('open'); // open a window

$('#win').window('close'); // close a window

Loads window content via ajax.



$('#win').window('refresh', 'get_content.php');

property

This property extends the panel; the following are properties overridden and added for the window.

Name Type Description Default value
title string The title text of the window. New Window
collapsible boolean Defines whether to show the collapse button. true
minimizable boolean Defines whether to show the minimize button. true
maximizable boolean Defines whether to show the maximize button. true
closable boolean Defines whether to show the close button. true
closed boolean Defines whether to close the window. false
zIndex number The z-index of the window, from which incrementing starts. 9000
draggable boolean Defines whether the window is draggable. true
resizable boolean Defines whether the window is resizable. true
shadow boolean If set to true, a shadow is shown when the window can display one. true
inline boolean Defines how to place the window; when set to true it is placed inside its parent container, and when set to false it floats on top of all elements. false
modal boolean Defines whether the window is a modal window. true

Events

This event extends the panel.

Method

This method extends the panel; the following are methods added for the window.

Name Parameters Description
window none Returns the outer window object.
hcenter none Centers the window horizontally. This method is available since version 1.3.1.
vcenter none Centers the window vertically. This method is available since version 1.3.1.
center none Centers the window. This method is available since version 1.3.1.

jQuery EasyUI Plugins jQuery EasyUI Plugins