I am using select2 (http://ivaynberg.github.io/select2/) for my tagging input. from the example in using select2 tagging the code is look like this.
$(\"#e1
Updated version
Say you initialized your select like this:
$('.mySelect').select2({
multiple: true,
tags: "true"
});
Then use this 2 functions for triggering the change. (as seen in the official documentation)
$('.mySelect').val(['value1', 'value2']);
$('.mySelect').trigger('change.select2');
Where "value1" and "value2" are IDs of the option elements of the select.