Hi dan123,
Comparison in JavaScript is done with the ==
or ===
operators, not with =
. Please change your code to:
$('#jqxDropDownList').on('select', function(event) {
var args = event.args;
if (args) {
// index represents the item's index.
var index = args.index;
var item = args.item;
// get item's label and value.
var label = item.label;
var value = item.value;
}
if (label == 'Americano') {
$("#Button1").show();
$("#Button2").hide();
}
if (label == 'Bicerin') {
$("#Button2").show();
$("#Button1").hide();
}
});
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/