Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-bordered table-striped mb-none" id="pricetable">
- <thead>
- <tr>
- <th width="20%">Aantal</th>
- <th width="40%">Beschrijving</th>
- <th width="20%">Prijs per eenheid</th>
- <th width="20%">Totaal</th>
- </tr>
- </thead>
- <tbody>
- <tr class="gradeX">
- <td width="20%"><input type="text" class="form-control" id="amount" placeholder="Aantal" name="amountoff[]"/></td>
- <td width="30%"><input type="text" class="form-control" id="jobdescrip" placeholder="Beschrijving" name="job[]"/></td>
- <td width="20%"><input type="text" class="form-control" id="price" placeholder="Prijs per eenheid" name="priceoff[]"/></td>
- <td width="20%"><input type="text" class="form-control" id="total" placeholder="Totaal" name="totaal[]"/></td>
- </tr>
- </tbody>
- </table>
- /* Ongebelangrijk stuk code tussen */
- <script>
- /* Dit stuk zorgt ervoor dat wanneer een nieuwe rij wordt opgevraagd, de laatste rij gekopieerd wordt en de inhoud geleegd wordt. */
- $('#newrow').click(function(){
- $('#pricetable tbody>tr:last').clone(true).insertAfter('#pricetable tbody>tr:last');
- $('#pricetable tbody>tr:last [name="amountoff[]"]').val('');
- $('#pricetable tbody>tr:last [name="job[]"]').val('');
- $('#pricetable tbody>tr:last [name="priceoff[]"]').val('');
- $('#pricetable tbody>tr:last [name="totaal[]"]').val('');
- return false;
- });
- </script>
- <script src="invoice.handler.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment