Name
|
Type
|
Default
|
animationType
|
String
|
'slide'
|
Sets or gets the animation type.
Possible Values:
'slide'
'fade'
'none'
Code example
Set the animationType property.
$('#jqxNavigationBar').jqxNavigationBar({animationType: "none" });
Get the animationType property.
var animationType = $('#jqxNavigationBar').jqxNavigationBar('animationType');
|
arrowPosition
|
String
|
'right'
|
Sets or gets header's arrow position.
Possible Values:
'left'
'right'
Code example
Set the arrowPosition property.
$('#jqxNavigationBar').jqxNavigationBar({ arrowPosition: "right" });
Get the arrowPosition property.
var arrowPosition = $('#jqxNavigationBar').jqxNavigationBar('arrowPosition');
|
collapseAnimationDuration
|
Number
|
400
|
Sets or gets the collapsing animation duration.
Code example
Set the collapseAnimationDuration property.
$('#jqxNavigationBar').jqxNavigationBar({ collapseAnimationDuration: 400});
Get the collapseAnimationDuration property.
var collapseAnimationDuration = $('#jqxNavigationBar').jqxNavigationBar('collapseAnimationDuration');
|
disabled
|
Boolean
|
false
|
Sets or gets whether the navigation bar is disabled.
Code example
Set the disabled property.
$('#jqxNavigationBar').jqxNavigationBar({ disabled:true });
Get the disabled property.
var disabled = $('#jqxNavigationBar').jqxNavigationBar('disabled');
|
expandAnimationDuration
|
Number
|
400
|
Sets or gets the expanding animation duration.
Code example
Set the expandAnimationDuration property.
$('#jqxNavigationBar').jqxNavigationBar({ expandAnimationDuration: 400 });
Get the expandAnimationDuration property.
var expandAnimationDuration = $('#jqxNavigationBar').jqxNavigationBar('expandAnimationDuration');
|
expandMode
|
String
|
'singleFitHeight'
|
Sets or gets navigation bar's expand mode. Possible values ['single', 'singleFitHeight'
'multiple', 'toggle', 'none'].
Possible Values:
'single' - only one item can be expanded. If the expanded item's height is greater than the value of the height property, a vertical scrollbar is shown.
'singleFitHeight' - only one item can be expanded. If the expanded item's height is greater than the value of the height property, a vertical scrollbar is shown inside the content of the expanded item
'multiple' - multiple items can be expanded. If the expanded items' height is greater than the value of the height property, a vertical scrollbar is shown.
'toggle' - only one item can be expanded. The expanded item can also be collapsed.If the expanded item's height is greater than the value of the height property, a vertical scrollbar is shown
'none' - no items can be expanded/collapsed
Code example
Set the expandMode property.
$('#jqxNavigationBar').jqxNavigationBar({ expandMode: "none" });
Get the expandMode property.
var expandMode = $('#jqxNavigationBar').jqxNavigationBar('expandMode');
|
expandedIndexes
|
Array
|
[]
|
Sets or gets the expanded item(s). If the property expandMode is set
to either 'single', 'singleFitHeight', 'toggle' or 'none', only the item corresponding
to the first value in the array is expanded. If the property expandMode
is set to either 'single' or 'singleFitHeight' and the expandedIndexes array is
empty, the first item is expanded automatically.
Code example
Set the expandedIndexes property.
$('#jqxNavigationBar').jqxNavigationBar({ expandedIndexes: [0, 1] });
Get the expandedIndexes property.
var expandedIndexes = $('#jqxNavigationBar').jqxNavigationBar('expandedIndexes');
|
height
|
Number/String
|
'auto'
|
Sets or gets the navigationbar's height. Possible values - 'auto' or string like
this 'Npx' where N is any Number or a numeric value in pixels.
Code example
Set the height property.
$('#jqxNavigationBar').jqxNavigationBar({ height: 200 });
Get the height property.
var height = $('#jqxNavigationBar').jqxNavigationBar('height');
|
initContent
|
function
|
null
|
Callback function called when an item's content needs to be initialized. Useful
for initializing other widgets within the content of any of the items of jqxNavigationBar.
The index argument shows which item is initialized.
Code example
Set the initContent property.
$("#jqxNavigationBar").jqxNavigationBar({initContent: function (index)
{
$("#jqxButton").jqxButton({ width: 100, height: 50 });
}
});
Get the initContent property.
var initContent = $('#jqxNavigationBar').jqxNavigationBar('initContent');
|
rtl
|
Boolean
|
false
|
Determines whether the right-to-left support is enabled.
Code example
Set the rtl property.
$("#jqxNavigationBar").jqxNavigationBar({ rtl: true });
Get the rtl property.
var rtl = $('#jqxNavigationBar').jqxNavigationBar('rtl');
|
showArrow
|
Boolean
|
true
|
Sets or gets whether header's arrow is going to be shown.
Code example
Set the showArrow property.
$('#jqxNavigationBar').jqxNavigationBar({ showArrow: false });
Get the showArrow property.
var showArrow = $('#jqxNavigationBar').jqxNavigationBar('showArrow');
|
theme
|
String
|
''
|
Sets the widget's theme.
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. In order to set
a theme, you need to do the following:
|
toggleMode
|
String
|
click
|
Sets or gets user interaction used for expanding or collapsing the content. Possible
values ['click', 'dblclick', 'none'].
Possible Values:
'click'
'dblclick'
'none'
Code example
Set the toggleMode property.
$('#jqxNavigationBar').jqxNavigationBar({ toggleMode: "none" });
Get the toggleMode property.
var toggleMode = $('#jqxNavigationBar').jqxNavigationBar('toggleMode');
|
width
|
Number/String
|
'auto'
|
Sets or gets the navigationbar's width. Possible values - 'auto' or string like
this 'Npx' where N is any Number or a numeric value in pixels.
Code example
Set the width property.
$('#jqxNavigationBar').jqxNavigationBar({ width: 'auto' });
Get the width property.
var width = $('#jqxNavigationBar').jqxNavigationBar('width');
|
|
collapsingItem
|
Event
|
|
This event is triggered when a jqxNavigationBar item is going to be collapsed.
Code example
Bind to the collapsingItem event by type: jqxNavigationBar.
$('#jqxNavigationBar').on('collapsingItem', function (event)
{
var collapsingItem = event.args.item; alert("Expanding item number: " + collapsingItem);
});
|
collapsedItem
|
Event
|
|
This event is triggered when a jqxNavigationBar item is collapsed.
Code example
Bind to the collapsedItem event by type: jqxNavigationBar.
$('#jqxNavigationBar').on('collapsedItem', function (event)
{
var collapsedItem0= event.args.item; alert("Expanding item number: " + collapsedItem);
});
|
expandingItem
|
Event
|
|
This event is triggered when a jqxNavigationBar item is going to be expanded.
Code example
Bind to the expandingItem event by type: jqxNavigationBar.
$('#jqxNavigationBar').on('expandingItem', function (event)
{
var expandingItem = event.args.item; alert("Expanding item number: " + expandingItem);
});
|
expandedItem
|
Event
|
|
This event is triggered when a jqxNavigationBar item is expanded.
Code example
Bind to the expandedItem event by type: jqxNavigationBar.
$('#jqxNavigationBar').on('expandedItem', function (event)
{
var expandedItem = event.args.item; alert("Expanded item number: " + expandedItem);
});
|
|
add
|
Method
|
|
This method inserts an item at the bottom of the navigationbar. It has two parameters
- header (the header of the new item) and content (the content of the new item).
Parameter |
Type |
Description |
item |
String |
|
item |
String |
|
Return Value
None
Code example
Invoke the add method.
$('#jqxNavigationBar').jqxNavigationBar('add', 'Header', 'Content');
|
collapseAt
|
Method
|
|
Collapsing item with any index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the collapseAt method.
$('#jqxNavigationBar').jqxNavigationBar('collapseAt', 3);
|
disableAt
|
Method
|
|
Disabling item with any index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the disableAt method.
$('#jqxNavigationBar').jqxNavigationBar('disableAt', 3);
|
disable
|
Method
|
|
This method is disabling the navigation bar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the disable method.
$('#jqxNavigationBar').jqxNavigationBar('disable');
|
destroy
|
Method
|
|
This method destroys the navigationbar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the destroy method.
$('#jqxNavigationBar').jqxNavigationBar('destroy');
|
expandAt
|
Method
|
|
Expanding item with any index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the expandAt method.
$('#jqxNavigationBar').jqxNavigationBar('expandAt', 3);
|
enableAt
|
Method
|
|
Enabling item with any index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the enableAt method.
$('#jqxNavigationBar').jqxNavigationBar('enableAt', 3);
|
enable
|
Method
|
|
This method is enabling the navigation bar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the enable method.
$('#jqxNavigationBar').jqxNavigationBar('enable');
|
focus
|
Method
|
|
This method focuses on the navigationbar. When the widget is focused, keyboard navigation
can be used. Here is a list of the keys, supported by jqxNavigationBar and their
function:
-
Enter/Spacebar - if the focus is on an item header, collapses or expands
the item.
-
Left/Up arrow - focuses on the previous item header or on the last
one if the currently focused is the first one.
-
Right/Down arrow - focuses on the next item header or on the first
one if the currently focused is the last one.
- End - focuses on the last item header.
- Home - focuses on the first item header.
- Tab - focuses on the first header or the next element in the DOM.
-
Ctrl+Up arrow - if the focus is on an item content, focuses on its
respective header.
-
Ctrl+Down arrow - if the focus is on an item header, focuses on its
respective content.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the focus method.
$('#jqxNavigationBar').jqxNavigationBar('focus');
|
getHeaderContentAt
|
Method
|
|
Getting header content of item with any index. Returns a string value.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the getHeaderContentAt method.
var header = $('#jqxNavigationBar').jqxNavigationBar('getHeaderContentAt',3);
|
getContentAt
|
Method
|
|
Getting content of item with any index. Returns a string value.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the getContentAt method.
var content = $('#jqxNavigationBar').jqxNavigationBar('getContentAt', 3);
|
hideArrowAt
|
Method
|
|
Hiding the arrow of an item with specific index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the hideArrowAt method.
$('#jqxNavigationBar').jqxNavigationBar('hideArrowAt', 3);
|
invalidate
|
Method
|
|
This method refreshes the navigationbar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the invalidate method.
('#jqxNavigationBar').jqxNavigationBar('invalidate');
|
insert
|
Method
|
|
This method inserts an item at a specific index. It has three parameters - index,
header (the header of the new item) and content (the content of the new item).
Parameter |
Type |
Description |
Index |
Number |
|
item |
String |
|
item |
String |
|
Return Value
None
Code example
Invoke the insert method.
$('#jqxNavigationBar').jqxNavigationBar('insert', 1, 'Header', 'Content');
|
refresh
|
Method
|
|
This method refreshes the navigationbar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the refresh method.
$('#jqxNavigationBar').jqxNavigationBar('refresh');
|
render
|
Method
|
|
This method renders the navigationbar.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the render method.
$('#jqxNavigationBar').jqxNavigationBar('render');
|
remove
|
Method
|
|
This method removes an item at a specific index. The parameter (index) is optional
and if it is not set, the method removes the last item.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the remove method.
$('#jqxNavigationBar').jqxNavigationBar('remove', 0);
|
setContentAt
|
Method
|
|
Setting content to item with any index.
Parameter |
Type |
Description |
index |
Number |
|
item |
String |
|
Return Value
None
Code example
Invoke the setContentAt method.
$('#jqxNavigationBar').jqxNavigationBar('setContentAt', 3, 'Content');
|
setHeaderContentAt
|
Method
|
|
Setting header content to item with any index
Parameter |
Type |
Description |
index |
Number |
|
item |
String |
|
Return Value
None
Code example
Invoke the setHeaderContentAt method.
$('#jqxNavigationBar').jqxNavigationBar('setHeaderContentAt', 3, 'Header');
|
showArrowAt
|
Method
|
|
Showing the arrow of an item with specific index.
Parameter |
Type |
Description |
index |
Number |
|
Return Value
None
Code example
Invoke the showArrowAt method.
$('#jqxNavigationBar').jqxNavigationBar('showArrowAt', 3);
|
update
|
Method
|
|
This method updates an item at a specific index. It has three parameters - index,
header (the new header of the item) and content (the new content of the item).
Parameter |
Type |
Description |
index |
Number |
|
item |
String |
|
item |
String |
|
Return Value
None
Code example
Invoke the update method.
$('#jqxNavigationBar').jqxNavigationBar('update', 0, 'New header', 'New content');
|
val
|
Method
|
|
Sets or gets the expanded item.
Parameter |
Type |
Description |
value |
String |
|
Return Value
String
Code example
Invoke the val method.
// Get the expanded item.
var value = $("#jqxNavigationBar").jqxNavigationBar('val');
// Get the expanded item's index using jQuery's val()
var value = $("#jqxNavigationBar").val();
// Set the expanded item.
$("#jqxNavigationBar").jqxNavigationBar('val', 2);
// Set the expanded item using jQuery's val().
$("#jqxNavigationBar").val(2);
|