I am adding a <option>
with ajax and append it on success:
success: function(data) {
var newdata = data.replace(/['"]+/g, '');
jQuery('#argomenti').append('<option value="">'+newdata+'</option>');
}
But how would I make it so that it is the selected as I will have many other tags and values in that ?
Something like $('#argomenti').val(newdata).prop('selected', true);