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 jqxPasswordInput.- jqx-input - applied to the input.
- jqx-widget - applied to the input.
- jqx-widget-content - applied to the input. Adds the background.
- jqx-rc-all - applied to the input. Adds rounded corners to the widget.
- jqx-input-disabled - applied to the input when it is disabled.
- jqx-fill-state-disabled - applied to the input when it is disabled.
- jqx-passwordinput-password-strength-inicator - applied to the strength indicator.
- jqx-passwordinput-password-icon - applied to the password input's icon.
- jqx-passwordinput-password-icon-rtl - applied to the password input's icon in right-to-left mode.
- Add the above CSS classes related to jqxPasswordInput
- After each CSS class, add your theme name.
For example:
jqx-input-summer - To apply your custom style to jqxPasswordInput, you need to set its 'theme' property(option)
to point to your theme name string.
<script type="text/javascript"> $(document).ready(function () { $("#input").jqxPasswordInput({ width: '250px', height: '25px', theme: 'bootstrap' }); });</script>
- The sample below demonstrates how to set the 'Summer' theme to jqxPasswordInput.
<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.bootstrap.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/jqxpasswordinput.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 class='default'> <div id='content'> <script type="text/javascript"> $(document).ready(function () { $("#input").jqxPasswordInput({ placeHolder: "Enter a Password", height: 25, width: 200, minLength: 1, theme: 'bootstrap' }); }); </script> <input type="password" id="input"/> </div></body></html>