JQuery ListBox
Invoke the addItem method of the jqxListBox. Author: http://jqwidgets.com
by pkeller3
HTML
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='jqxListBox'></div>
<div>
<input style="margin-top: 20px;" type="button" id='jqxButton' value="Add item" />
<input style="margin-top: 20px;" type="text" id='jintput'
</div>
JavaScript
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte"];
// Create a jqxListBox
$("#jqxListBox").jqxListBox({
source: source,
theme: 'energyblue',
width: '200px',
height: '250px',
selectedIndex: 3
});
$("#jqxButton").jqxButton({
theme: 'energyblue'
});
$('#jqxButton').on('click', function () {
$("#jqxListBox").jqxListBox('addItem', 'jQuery');
});