Name
|
Type
|
Default
|
alwaysShowNavigationArrows
|
Boolean
|
false
|
Sets or gets the jqxListMenu's alwaysShowNavigationArrows property. The alwaysShowNavigationArrows specifies whether navigation arrows are displayed for all items.
Code example
Set the alwaysShowNavigationArrows property.
$("#jqxListMenu").jqxListMenu({ alwaysShowNavigationArrows: true });
Get the alwaysShowNavigationArrows property.
var alwaysShowNavigationArrows = $('#jqxListMenu').jqxListMenu('alwaysShowNavigationArrows');
|
animationType
|
String
|
"slide"
|
Sets or gets the animation's type.
Possible Values:
'slide'
'fade'
Code example
Set the animationType property.
$("#jqxListMenu").jqxListMenu({animationType: 'fade'});
Get the animationType property.
var animationType = $('#jqxListMenu').jqxListMenu('animationType');
|
animationDuration
|
Number
|
250
|
Sets or gets the animation duration in milliseconds.
Code example
Set the animationDuration property.
$("#jqxListMenu").jqxListMenu({animationDuration: 130});
Get the animationDuration property.
var animationDuration = $('#jqxListMenu').jqxListMenu('animationDuration');
|
autoSeparators
|
Boolean
|
false
|
Sets or gets whether auto separators will be generated.
Separator is generated for a sequence of list items with equal start character.
The property is possible to be set through the attribute data-auto-separators="true".
Code Example:
<ul data-role="listmenu" data-auto-separators="true">
Code example
Set the autoSeparators property.
$("#jqxListMenu").jqxListMenu({ autoSeparators: true });
Get the autoSeparators property.
var autoSeparators = $('#jqxListMenu').jqxListMenu('autoSeparators');
|
backLabel
|
String
|
"Back"
|
Sets or gets the BackButton's label.
Code example
Set the backLabel property.
$("#jqxListMenu").jqxListMenu({backLabel: 'Back'});
Get the backLabel property.
var backLabel = $('#jqxListMenu').jqxListMenu('backLabel');
|
disabled
|
Boolean
|
false
|
Sets or gets the jqxListMenu's disabled property.
Code example
Set the disabled property.
$("#jqxListMenu").jqxListMenu({ disabled: true });
Get the disabled property.
var disabled = $('#jqxListMenu').jqxListMenu('disabled');
|
enableScrolling
|
Boolean
|
true
|
When the jqxListMenu is created with the enableScrolling property set to true, vertical scrollbar automatically appears, if the items overflow the visible area.
In order to use this feature, the following files should be included: jqxpanel.js and jqxscrollbar.js.
Code example
Set the enableScrolling property.
$("#jqxListMenu").jqxListMenu({ enableScrolling: false });
Get the enableScrolling property.
var enableScrolling = $('#jqxListMenu').jqxListMenu('enableScrolling');
|
filterCallback
|
Function
|
function (text, searchValue){return text.toString().toLowerCase().indexOf(searchValue.toLowerCase()) >= 0;};
|
Used for filtering the jqxListMenu using the filter input.
Code example
Set the filterCallback property.
$('#jqxListMenu').jqxListMenu({ filterCallback: function (text, searchValue) { return text.toString().toLowerCase().indexOf(searchValue.toLowerCase()) >= 0;}});
Get the filterCallback property.
var filterCallback = $('#jqxListMenu').jqxListMenu('filterCallback');
|
height
|
String
|
auto
|
Sets or gets the jqxListMenu's height.
Code example
Set the height property.
$("#jqxListMenu").jqxListMenu({ height: '250px' });
Get the height property.
var height = $('#jqxListMenu').jqxListMenu('height');
|
headerAnimationDuration
|
Number
|
0
|
Sets or gets the animation duration of the header. Header of a listmenu could be set whether the data-role attribute of a list item is set to 'header'.
Example:
<ul data-role="listmenu"> <li data-role="header">Header </li>
This property is setting the duration of the animation used for changing the header when different nested listviews are switched.
Fade animation is used for switching through different headers.
Code example
Set the headerAnimationDuration property.
$("#jqxListMenu").jqxListMenu({ headerAnimationDuration: 250 });
Get the headerAnimationDuration property.
var headerAnimationDuration = $('#jqxListMenu').jqxListMenu('headerAnimationDuration');
|
placeHolder
|
String
|
'Filter list items...'
|
Sets or gets the filter input field's place holder.
Code example
Set the placeHolder property.
$("#jqxListMenu").jqxListMenu({ placeHolder: 'Search items...' });
Get the placeHolder property.
var placeHolder = $('#jqxListMenu').jqxListMenu('placeHolder');
|
readOnly
|
Boolean
|
false
|
Sets or gets whether the list will be read-only.
In readOnly mode, items are not clickable.
Code example
Set the readOnly property.
$("#jqxListMenu").jqxListMenu({ readOnly: false });
Get the readOnly property.
var readOnly = $('#jqxListMenu').jqxListMenu('readOnly');
|
rtl
|
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
Code example
Set the rtl property.
$('#jqxListMenu').jqxListMenu({rtl : true});
Get the rtl property.
var rtl = $('#jqxListMenu').jqxListMenu('rtl');
|
roundedCorners
|
Boolean
|
true
|
Sets or gets the jqxListMenu's roundedCorners property.
Code example
Set the roundedCorners property.
$("#jqxListMenu").jqxListMenu({ roundedCorners: false });
Get the roundedCorners property.
var roundedCorners = $('#jqxListMenu').jqxListMenu('roundedCorners');
|
showNavigationArrows
|
Boolean
|
true
|
Sets or gets the jqxListMenu's showNavigationArrows property. The showNavigationArrows specifies whether navigation arrows are displayed only for list items with nested Lists
Code example
Set the showNavigationArrows property.
$("#jqxListMenu").jqxListMenu({ showNavigationArrows: false });
Get the showNavigationArrows property.
var showNavigationArrows = $('#jqxListMenu').jqxListMenu('showNavigationArrows');
|
showFilter
|
Boolean
|
false
|
Sets or gets whether the filter input field is visible.
Code example
Set the showFilter property.
$("#jqxListMenu").jqxListMenu({ showFilter: true });
Get the showFilter property.
var showFilter = $('#jqxListMenu').jqxListMenu('showFilter');
|
showHeader
|
Boolean
|
true
|
Sets or gets whether the header will be visible.
Code example
Set the showHeader property.
$("#jqxListMenu").jqxListMenu({showHeader: false});
Get the showHeader property.
var showHeader = $('#jqxListMenu').jqxListMenu('showHeader');
|
showBackButton
|
Boolean
|
true
|
Indicates whether the back button will be visible.
Code example
Set the showBackButton property.
$("#jqxListMenu").jqxListMenu({showBackButton: true});
Get the showBackButton property.
var showBackButton = $('#jqxListMenu').jqxListMenu('showBackButton');
|
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:
|
width
|
String
|
100%
|
Sets or gets the jqxListMenu's width.
Code example
Set the width property.
$("#jqxListMenu").jqxListMenu({ width: '250px' });
Get the width property.
var width = $('#jqxListMenu').jqxListMenu('width');
|
|
back
|
Method
|
|
Navigates to the previous page.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the back method.
$("#jqxListMenu").jqxListMenu('back');
|
changePage
|
Method
|
|
Sets the displayed page. The page could be set using a selector or object.
The page must be a child of the current list and it's data-role must be set to "listmenu".
Parameter |
Type |
Description |
Item |
Object/String |
|
Return Value
None
Code example
Invoke the changePage method.
// @param String
$("#jqxListMenu").jqxListMenu('changePage', '#newPage' );
Code example
<!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.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxListMenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript"> $(document).ready(function () { $( '#list').jqxListMenu({ autoSeparators: true, showHeader: true, width: '600px', placeholder: 'Find contact...' }); $( '#list').jqxListMenu('changePage', '#content'); }); </script> <style type="text/css"> html, body { margin: 0px; padding: 0px; width: 100%; height: 100%; } #list img { width: 50px; height: 55px; } #list div { margin-top: -35px; margin-left: 80px; } .jqx-listmenu-item { padding: 0px; min-height: 57px; } div td { padding-top: 5px; padding-bottom: 5px; } </style></head><body class='default'> <ul id="list" data-role="listmenu"> <li> <img src="../../images/andrew.png" alt="" /><div> Andrew Fuller </div> <ul id='content' data-role="listmenu"> <li> <div style="padding: 5px;" data-role="content"> <table> <tr> <td> <img width="50" height="50" src="../../images/andrew.png" alt="" /> </td> <td> <b>Andrew Fuller </b> </td> </tr> <tr> <td> Title </td> <td> Sales Representative </td> </tr> <tr> <td> Notes </td> <td> "Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association. </td> </tr> <tr> <td> Birth Date </td> <td> 19-Feb-52 </td> </tr> <tr> <td> Hire Date </td> <td> 14-Aug-92 </td> </tr> <tr> <td> Home Phone </td> <td> (206) 555-9482 </td> </tr> <tr> <td> Address </td> <td> 908 W. Capital Way. </td> </tr> <tr> <td> Postal Code </td> <td> 98401 </td> </tr> <tr> <td> City </td> <td> Tacoma </td> </tr> <tr> <td> Country </td> <td> USA </td> </tr> </table> </div> </li> </ul> </li> <li> <img src="../../images/anne.png" alt="" /><div> Anne Dodsworth </div> <ul data-role="listmenu"> <li> <div style="padding: 5px;" data-role="content"> <table> <tr> <td> <img width="50" height="50" src="../../images/anne.png" alt="" /> </td> <td> <b>Anne Dodsworth </b> </td> </tr> <tr> <td> Title </td> <td> Inside Sales Coordinator </td> </tr> <tr> <td> Notes </td> <td> Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German. </td> </tr> <tr> <td> Birth Date </td> <td> 27-Jan-66 </td> </tr> <tr> <td> Hire Date </td> <td> 15-Nov-94 </td> </tr> <tr> <td> Home Phone </td> <td> (71) 555-5598 </td> </tr> <tr> <td> Address </td> <td> 7 Houndstooth Rd. </td> </tr> <tr> <td> Postal Code </td> <td> WG2 7LT </td> </tr> <tr> <td> City </td> <td> London </td> </tr> <tr> <td> Country </td> <td> UK </td> </tr> </table> </div> </li> </ul> </li> <li> <img src="../../images/janet.png" alt="" /><div> Janet Leverling </div> <ul data-role="listmenu"> |