Last active
March 11, 2018 16:55
-
-
Save igun997/579e04c151e2a61d837458297668c9c2 to your computer and use it in GitHub Desktop.
Select2 Add Option On Ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dataSelected = { | |
id: response.result.id_brk, | |
text: response.result.id_brk+" - "+response.result.nama_ap | |
}; | |
var newOption = new Option(dataSelected.text, dataSelected.id, false, false); | |
$('#ea_pekerjaan_id').append(newOption).trigger('change'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment