Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>Coût HT</th>
- <th>Marge</th>
- <th>Prix TTC</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td align="center"><p id="totalcout"></p></td>
- <td align="center"><p id="marge">5</p></td>
- <td align="center"><p id="ttc"></p></td>
- </tr>
- </tbody>
- // Addition when click checkbox
- $("input[type=checkbox]").click(function(e) {
- var total = 0;
- $("input[type=checkbox]:checked").each(function() {
- total += parseFloat($(this).val());
- });
- if (total == 0) {
- $("#totalcout").html(0);
- } else {
- $("#totalcout").html(total + ' €');
- }
- })
Add Comment
Please, Sign In to add comment