I have a text field and a button, the user can enter a name in the text box and press the button.
Currently as it stands my code adds the item to the options which is then available for the user to select.
$("#btnAddCast").click(function () {
$('#listActivities').append('<option>'+ $("#txtCast").val() + '</option>');
$('#listActivities').trigger('chosen:updated');
return false;
});
What I want to do / can't find within the chosen.js documentation is how to make that newly added item selected automatically does anyone know how to do such a thing?
It looks like the selects still act as normal selects. I'd just select the last item like so: