updateParticipants: function(data) {
var $select = $('#field-participants');
$select.append(
$('<option></option>')
.val(data.value)
.html(data.name));
$('#field-participants').trigger('liszt:updated');
}
The above function is called on success of this ajax request:
$.ajax({
url: base_url + 'index.php/timeline/update_table',
type: 'post',
data: {newVal : newVal, field:field },
success: function(response) {
var responseData = $.parseJSON(response);
self.updateParticipants(responseData);
//some code was removed here as sometimes another method is called depending on the field returned
}
});
As mentioned in the first post I can confirm the data is returned and the Dom is updated with the new select option. It is only at this point
$('#field-participants').trigger('liszt:updated');
that nothing happens. Also I want to confirm that this refresh does work on single selects