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 jqxNavigationBar.- jqx-widget - applied to the jqxNavigationBar widget.
- jqx-navigationbar - applied to the jqxNavigationBar.
- jqx-expander-header - applied to the expander's header.
- jqx-widget-header - applied to the header elements.
- jqx-fill-state-normal - applied to the header elements.
- jqx-expander-content - applied to the content elements.
- jqx-widget-content - applied to the content elements.
- jqx-expander-arrow - applied to the header's expand/collapse button.
- jqx-expander-arrow-top - applied to the expander's expand/collapse button and displays arrow icon.
- jqx-expander-arrow-bottom - applied to the expander's expand/collapse button and displays arrow icon.
- jqx-expander-header-hover - applied to a hovered header element.
- jqx-fill-state-hover - applied to a hovered header element.
- jqx-fill-state-pressed - applied to an expanded header element.
- jqx-fill-state-focus - applied to focused Content or Header elements.
- jqx-fill-state-disabled - applied to the jqxNavigationBar when it is disabled.
- Add the above CSS classes related to jqxnavigationbar
- After each CSS class, add your theme name.
For example:
jqx-navigationbar-summer - To apply your custom style to jqxnavigationbar, you need to set its 'theme' property(option)
to point to your theme name string.
<script type="text/javascript"> $(document).ready(function () { // Create jqxNavigationBar $("#jqxnavigationbar").jqxNavigationBar({ theme: 'summer', width: 200, height: 200 }); });</script>
- The sample below demonstrates how to set the 'Summer' theme to jqxNavigationBar.
<!DOCTYPE html><html lang="en"><head> <title>jQuery Navigation Bar - CSS Styling Sample</title> <meta name="keywords" content="jQuery NavigationBar Widget, Accordion, jqxNavigationBar, jQuery Widgets, jQuery Plugins, jQuery UI Widgets, jQuery UI" /> <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/jqxexpander.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxnavigationbar.js"></script> <script type="text/javascript"> $(document).ready(function () { // Create jqxNavigationBar $("#jqxnavigationbar").jqxNavigationBar({ width: 200, height: 200, theme: 'summer' }); }); </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='jqxnavigationbar'> <!--Header--> <div> Header 1</div> <!--Content--> <div> Content 1 </div> <!--Header--> <div> Header 2</div> <!--Content--> <div> Content 2 </div> <!--Header--> <div> Header 3</div> <!--Content--> <div> Content 3 </div> </div></body></html>