Change civicrm combobox value from the code
The widget is select2 3.5. But you don't need to interact with it directly. Find a selector for the underlying &lt;select&gt; element in the dom, set it's value, and then fire the change event. E.g.

CRM.$(function($) {
  $("#country-1").val(val).change()
});


Note that you should use CiviCRM's copy of jQuery and not the WP copy. So the above code uses CRM.$ instead of jQuery. Using the wrong copy of jQuery would make things weird as change events would appear to have no effect, etc.