Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($('#kode_produk').find("option[value='1']").length) {
- $('#kode_produk').val('1').trigger('change');
- } else {
- // Create a DOM Option and pre-select by default
- var newOption = new Option('1', 'text 1',true, true);
- // Append it to the select
- $('#kode_produk').append(newOption).trigger('change');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement