i have a code
$("#client").live("change", function() {
var clientId = $('select[name="client"]').val();
if(!isEmpty(clientId)){
batchDropDownPopulate(clientId, "batch");
}
$("#client2").val(clientId);
var listItems = '<option value="">Please select</option>';
$("#campaign").html(listItems);
});
which i changed to
$('#client').on('change', function() {
var clientId = $(this).select2("val");
if(!isEmpty(clientId)){
batchDropDownPopulate(clientId, "batch");
}
$("#client2").val(clientId);
var listItems = '<option value="">Please select</option>';
$("#campaign").html(listItems);
});
But above code is not populating data or not working. Its not showing any error or not working on change event.