jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › NavigationBar, ToolBar, NavBar › Multiple levels
This topic contains 4 replies, has 3 voices, and was last updated by Peter Stoev 12 years, 1 month ago.
-
AuthorMultiple levels Posts
-
Can jqxNavigationBar become a little more sophisticated by having multiple levels ?
I send you an image illustration by using the support email but still try to explain by text :
Actually jqxNavigationBar http://www.jqwidgets.com/jquery-widgets-demo/#demos/jqxnavigationbar/defaultfunctionality.htm
is an accordion having one level of entry.While the idea is not to reproduce the different levels of a treeview hierarchy, we could usefully have 3 of them by using backgroud color and/or indentation to make the distinction between entries.
This is useful when a treeview is not needed or wanted for building collapsible lists with a few levels.
Hi Kynao,
Here’s how to crate nested Navigation Bars:
1. Create Navigation Bar
2. Inside of the content of its items, add another Navigation Bar.<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.7.2.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 () { var theme = ''; // Create jqxNavigationBar $("#jqxNavigationBar").jqxNavigationBar({ width: 350, height: 350, sizeMode: 'fitAvailableHeight', theme: theme }); $("#jqxNavigationBar2").jqxNavigationBar({ width: 300, height: 250, sizeMode: 'fitAvailableHeight', theme: theme }); }); </script></head><body class='default'> <div id='jqxWidget' style="float: left;"> <div style='overflow: hidden;' id='jqxNavigationBar'> <div>Header 1</div> <div> <div style="margin: 20px;" id="jqxNavigationBar2"> <div>Sub Header 1</div> <div>Sub Content 1</div> <div>Sub Header 2</div> <div>Sub Content 2</div> </div> </div> <div>Header 2</div> <div>Content 2</div> </div> </div></body></html>
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comExcellent, thanks you Peter
I followed the helpful advice in this post .. nesting jqxNavigationBar inside a content div in a parent jqxNavigatorBar.
The parent jqxNavigationBar is itself in a panel in a parent jqxDockPanel.I had problems with no jqxNavigationBar rendering.
On retracing steps I found that to make it work I had to delete the attributesizeMode: ‘fitAvailableHeight’
I don’t know why this attribute doesn’t work inside jqxDockPanel panel. Version jqxwidgets 2.8.
This post is just for information since the nesting jqxNavigationBar seems to be working now in first tes.
Hi d_l,
That post is from 1 year ago. There are multiple changes since then and some of them are breaking. Before using code from previous versions, I suggest you to take a look at the widget’s API Documentation and also the Release History.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.