JQuery DropDownList
Set the autoOpen property of the jqxDropDownButton. Author: http://jqwidgets.com Author: http://jqwidgets.com
by mogador
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>
1 - select an item in dropdownList ==> an alert occurs. <br>
2 - clic on "change autoOpen"<br>
3 - select an item in dropdownList ==> the alert Occurs 2 times !!!!.<br><br>
<button id="bt_autoOpen">Change AutoOpen</button>
<div id='jqxDropDownList'></div>
JavaScript
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait"
];
// Create a jqxDropDownList
$("#jqxDropDownList").jqxDropDownList({
source: source,
theme: 'energyblue',
autoOpen: true
});
$('#bt_autoOpen').click(function() {
$("#jqxDropDownList").jqxDropDownList({
autoOpen: false
});
});
$('#jqxDropDownList').on('select', function(event) {
if (event.args.type === "mouse" || event.args.type === "keyboard") {
alert("clic");
}
});