Hi DPolyakov,
Thank you for writing.
The equivalent of the “value” attribute is the “value” property.
The code below creates a data sources with label and value fields for each item.
var source = [ { label: "Affogato", value: "value1" }, { label: "Americano", value: "value2" }, { label: "Bicerin", value: "value3" }, { label: "Breve", value: "value4" }, { label: "Liqueur coffee", value: "value5" }, ]; // Create a jqxListBox $("#jqxListBox").jqxListBox({ source: source, width: '200px', height: '250px'});
Here’s how to retrieve the “value” and “text” of the selected item:
$('#jqxListBox').bind('select', function (event) { var args = event.args; var item = $('#jqxListBox').jqxListBox('getItem', args.index); // get value var value = item.value; // get text var text = item.label; });
Hope this helps you.
Please feel free to write us, if you have any further questions.
Best Regards,
Peter Stoev