1$('#sel_users').select2().trigger('change');
2
3$(document).ready(function(){
4
5 // Initialize Select2
6 $('#sel_users').select2();
7
8 // Set option selected onchange
9 $('#user_selected').change(function(){
10 var value = $(this).val();
11
12 // Set selected
13 $('#sel_users').val(value);
14 $('#sel_users').select2().trigger('change');
15
16 });
17});