The first step is to create html page and add links to the javascript files and css dependencies to your project. The jqxListBox widget requires the following files:
<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/jqxbuttons.js"></script><script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script><script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head>
To get the result of a function(method) call, you need to pass the method name in the jqxListBox’s constructor.$("#jqxlistbox").jqxListBox(‘selectIndex’, 1);
To set a property(option), you need to pass the property name and value(s) in the jqxListBox's constructor.$("#jqxlistbox").jqxListBox(‘getSelectedIndex’);
To get a property(option), you need to pass the property name to the jqxListBox's constructor.$("#jqxlistbox").jqxListBox({ checkboxes: false });
To bind to an event of a UI widget, you can use basic jQuery syntax. Let’s suppose that you want to get the selected item when the user clicks. The example code below demonstrates how to bind to the ‘select’ event of jqxListBox.var checkboxes = $("#jqxlistbox").jqxListBox('checkboxes');
$('#jqxListBox').on('select', function (event) {var args = event.args;var item = $('#jqxListBox').jqxListBox('getItem', args.index);});