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 jqxComplexInput.
  • jqx-complex-input - applied to the complex input.
  • jqx-input - applied to the complex input.
  • jqx-widget - applied to the complex input.
  • jqx-rc-all - applied to the complex input (if the roundedCorners property is set to true and the spin buttons are not enabled). Adds rounded corners to the widget.
  • jqx-input-disabled - applied to the complex input when it is disabled.
  • jqx-fill-state-disabled - applied to the complex input when it is disabled.
  • jqx-complex-input-rtl - applied to the complex input if the rtl property is set to true.
  • jqx-complex-input-spin-buttons-container - applied to the spin buttons container div.
When you create a custom style with colors and backgrounds for jqxComplexInput, you need to do the following:
  • Add the above CSS classes related to jqxComplexInput
  • After each CSS class, add your theme name.
    For example:
    jqx-complex-input-summer
  • To apply your custom style to jqxComplexInput, you need to set its 'theme' property (option) to point to your theme name string:
    <script type="text/javascript">
    $(document).ready(function () {
    $("#jqxComplexInput").jqxComplexInput({ theme: "summer", width: 250, height: 25, value: "15 + 7.2i" });
    });
    </script>
  • The sample below demonstrates how to set the 'summer' theme to jqxComplexInput:
    <!DOCTYPE html>
    <html>
    <head>
    <title>jQuery Complex Input Styling Sample</title>
    <link type="text/css" rel="Stylesheet" href="../../jqwidgets/styles/jqx.base.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/jqxcomplexinput.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#jqxComplexInput").jqxComplexInput({ theme: "summer", width: 250, height: 25, value: "15 + 7.2i" });
    });
    </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>
    <input id="jqxComplexInput" type="text" />
    </body>
    </html>