Skip to content

Instantly share code, notes, and snippets.

@renopaslah
Last active September 23, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renopaslah/3a0c89ae59f17f704be9ab3d1bfd1cb0 to your computer and use it in GitHub Desktop.
Save renopaslah/3a0c89ae59f17f704be9ab3d1bfd1cb0 to your computer and use it in GitHub Desktop.
Autonumeric Problem
$('.addPriceRow').click(function(){
new_row = '<tr>';
new_row += '<td>3</td>';
new_row += '<td><button class="btn btn-warning btn-sm" type="button" name="button"> <i class="fa fa-remove"></i> </button></td>';
new_row += '<td>';
new_row += '<select class="form-control satuan_jual" name="id_satuan_jual" style="width:100%">'
new_row += '<option></option>';
new_row += '</select>';
new_row += '</td>';
new_row += '<td><input class="form-control qty" type="text" name="" value=""></td>';
new_row += '<td><input class="form-control harga " type="text" name="" value=""></td>';
new_row += '<tr>';
$('.tprice').append(new_row);
initializeSatuanJual();
new AutoNumeric.multiple('tr#row-3 > .harga', 0, {
currencySymbol : 'Rp. ',
digitGroupSeparator : '.',
decimalCharacter : ',',
decimalPlaces : '0',
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment