# SELECT2 HANDLING handling select2 properties (case-study javascript code) ## get all options' loop through all ... opts = $('#sector').select2()[0].options for(i=0; i { let id = get_id_of_text(control, t); if (id !== false) ids.push(id); }) control.val(ids).change(); } select2_set_multi_text( $('#tags') , ['crime', '90s']) /* call */