jQuery UI Widgets › Forums › General Discussions › Navigation › NavigationBar, ToolBar, NavBar › Expanded indexes
Tagged: multiple, navigationbar
This topic contains 6 replies, has 3 voices, and was last updated by Peter Stoev 11 years, 9 months ago.
-
AuthorExpanded indexes Posts
-
AnonymousHow I can get all indexes of the expanded items when the navigationbar is in multiple expanded mode?
Hi Alex,
Thanks for writing.
In order to get the expanded items, you can use the “getItemStates” function. The “getItemStates” returns an array of item indexes and their expand/collapse states.
The code snippet below gets the jqxNavigationBar items states and loops through them. When the state’s value is true, the item is expanded, otherwise the item is collapsed.
var states = $(“#jqxNavigationBar”).jqxNavigationBar(‘getItemStates’);
$.each(states, function (index) {
if (this) {
// The current item is expanded.
}
else {
// The current item is collapsed.
}
});Hope this helps you.
Please feel free to write us, if you have additional questions.
Best Regards,
Peter StoevIs this active today?
Because it is not working to me.
I may collapse and reduce an index of a jqxnavigatorbar element, but I can’t see the states of such element.May you give us a working example?
Thank you
Nico
Hi Nico,
No, it is not active. The Topic is from 2011 as you see. To use the widget, please refer to its Getting Started and API pages in the Help Documentation.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOk, I’m referring to this documentation you said, but I need to know the state of a jqxnavigatorbar index.
There is nothing into documentation that may help, is there a way to do this?
Thank YouNico
. Three years ago was possible, today it is not?
. There is some milestone in future development that involves this feature?
Thank YouNico
Hi Nico,
You can use the widget’s expandedItem and collapsedItem events to store which item is expanded and which is collapsed. Ex: http://jsfiddle.net/jqwidgets/vUM9G/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.