I am new to jquery ui and I am trying to add a class to the selectmenu in jquery ui. I am trying this, but its not coming. Can somebody please help me in this
$('#dd1').change(function () {
var input = $(this);;
if (!input.val()) {
input.selectmenu().addClass("test");
}
else{
input.selectmenu().addClass("test1");
}
});
.test {border: 3px solid #FF0004;}
.test1 {border: 3px solid #28AF08;}
Is it the correct way to add class to select menu dynamically? Please guide me