JQuery ListBox
Invoke the removeItem method of the jqxListBox.
Author: http://jqwidgets.com
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="Remove 'итем2' from the list" />
</div>
JavaScript
var source = [
"итем1",
"итем2",
"итем3",
"итем4",
"итем5"];
// 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('removeItem', "итем2");
});