Documentation

Styling and Appearance

jQWidgets uses a pair of CSS files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.

Below is the list of CSS classes used by jqxWindow.
  • jqx-widget – applied to the jqxWindow.
  • jqx-window – applied to the jqxWindow.
  • jqx-window-disabled – applied to the jqxWindow when it’s disabled.
  • jqx-window-header – applied to the window’s header.
  • jqx-widget-header – applied to the window’s header.
  • jqx-window-content – applied to the window’s content.
  • jqx-widget-content – applied to the window’s content.
  • jqx-window-close-button – applied to the window’s close button.
  • jqx-window-collapse-button – applied to the window’s collapse button.
  • jqx-window-modal – setting styles of the modal window’s background.
When you create a custom style with colors and backgrounds for jqxWindow, you need to do the following:
  • Add the above CSS classes related to jqxWindow
  • After each CSS class, add your theme name.
    For example:
    jqx-window-summer
  • To apply your custom style to jqxWindow, you need to set its 'theme' property(option) to point to your theme name string.
  • The sample below demonstrates how to set the 'Summer' theme to jqxWindow.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en">
    <head>
    <title>jQuery Window CSS Styling Sample</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css"/>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.summer.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/jqxwindow.js"></script>
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head>
    <body>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#jqxwindow ").jqxWindow({ height:90, width: 150, theme: 'summer' });
    });
    </script>
    <div id='jqxwindow'>
    <div>Header</div>
    <div>Content</div>
    </div>
    </div>
    </body>
    </html>