title: Append option in multiple select
body: <p>I want to append option in multiple select, option value come from ajax responce
  I using jquery-select2 for multiple select feild
  My script code</p>
  
  <pre><code>$.ajax({    
                  type: "POST",
                  data: {'tc_agency_code': agencycode,'tc_agency_name': agencyname,'tc_agency_address':address,'tc_contact_no':contactno,'tc_port_id':port,'tc_port_id':port,'tc_agency_description':description,'xhttp_call':'Y'},
                  url: "&lt;?php echo $this-&gt;baseurl(); ?&gt;/agency/add",
                  success:function(response){
                  alert(response);
                      if(response =='null') {
                          error ='Agency name are already exist.';                
                          $( "#agency_name_error" ).html( error );
                          return false;
                      }
  
                      var result = $.parseJSON(response);
                      alert(result.tc_agency_id); //this alert showing id like '190'
                      alert(result.tc_agency_name); // this alert showing text like 'test'
  
                      $('#tc_agency_ids').append($('&lt;option&gt;&lt;/option&gt;').attr('value', "'"+ result.tc_agency_id +"'").text("'"+ result.tc_agency_name +"'"));
  
                      /* $('#tc_agency_ids').append($('&lt;option&gt;', { // i searched that this commented code is also correct for append the value in multiple select but not working in my code
                          value: result.tc_agency_id,
                          text : result.tc_agency_name 
                      })); */
  
                      $('#tc_agency_ids option[value='+ result.tc_agency_id +']').attr('selected', true);
                  $.fancybox.close();
  
                  },
                  error:function (xhr, ajaxOptions, thrownError){
                          alert(thrownError); 
                      }
                  });
  </code></pre>