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 jqxSlider.- jqx-widget - applied to the Splitter widget.
- jqx-splitter-splitbar-horizontal – split bar's class when the jqxSplitter is with horizontal orientation.
- jqx-splitter-splitbar-vertical – split bar's class when the jqxSplitter is with vertical orientation.
- jqx-fill-state-normal - applied to the split bar.
- jqx-fill-state-hover - applied to the split bar when it is hovered.
- jqx-splitter-invalid – This class is applied to the splitter when it's dragged to it's max left/right boundary.
- jqx-splitter-collapse-button-vertical – This class is added to split bar's collapse button when the splitter is with vectical orientation.
- jqx-splitter-collapse-button-horizontal – This class is added to split bar's collapse button when the splitter is with horizontal orientation.
- jqx-fill-state-pressed - applied to the collapse button. Adds border and background.
- jqx-splitter-panel – applied to the jqxSplitter's panels.
- jqx-widget-content - applied to the jqxSplitter's panels.
- jqx-fill-state-disabled - applied to the splitter when it is disabled.
- Add the above CSS classes related to jqxSplitter
- After each CSS class, add your theme name.
For example:
jqx-splitter-summer - To apply your custom style to jqxSplitter, 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 jqxSplitter.
<!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 Splitter 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/jqxbuttons.js"></script><script type="text/javascript" src="../../jqwidgets/jqxsplitter.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 () { $("#jqxSplitter").jqxSplitter({ theme: 'summer', panels: [{ size: '100px' }] }); }); </script> <div id='jqxSplitter' style="width:300px; height: 150px; background-color: #FFFFAF"> <div style="background-color: #97FFAF"></div> <div style="background-color: #E8C0AF"></div> </div></div></body></html>
You can see the result here: