JavaScript ComboBox
Bind to the unselect event by type: jqxComboBox. Author: http://jqwidgets.com
by jqwidgets
HTML
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<div id='jqxComboBox'></div>
JavaScript
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte"];
// Create a jqxComboBox
$("#jqxComboBox").jqxComboBox({
source: source,
theme: 'energyblue',
width: '200px',
height: '25px',
selectedIndex: 3
});
$('#jqxComboBox').on('unselect', function (event) {
var args = event.args;
if (args) {
// index represents the item's index.
var index = args.index;
var item = args.item;
if (!item) return;
// get item's label and value.
var label = item.label;
var value = item.value;
alert("label: " + label);
}
});