mardi 23 mars 2021

Selection of products priced with checkbox Jquery

I'm in a form... I need an intelligent control in Jquery for add and subtract the value of the checkboxes to dinamically have the total after every check or uncheck. Sorry form my english.. thank you

 <!-- checkboxes -->
                        <div class="form-check custom-control custom-checkbox mb-2">
                            <input type="checkbox" class="form-check-input custom-control-input" data-validation-required-message="Campo obbligatorio" id="maglia" value=10>
                            <label class="custom-control-label" style="color:black" for="maglia">....</label>
                        </div>
                        <div class="form-check custom-control custom-checkbox mb-2">
                            <input type="checkbox" class="form-check-input custom-control-input" data-validation-required-message="Campo obbligatorio" id="short" value=10>
                            <label class="custom-control-label" style="color:black" for="short">....</label>
                        </div>
                        <div class="form-check custom-control custom-checkbox mb-2">
                            <input type="checkbox" class="form-check-input custom-control-input" data-validation-required-message="Campo obbligatorio" id="calzettoni" value=10>
                            <label class="custom-control-label" style="color:black" for="calzettoni">...</label>
                        </div>
                        <div class="form-check custom-control custom-checkbox mb-2">
                            <input type="checkbox" class="form-check-input custom-control-input" data-validation-required-message="Campo obbligatorio" id="pinocchietti" value=10>
                            <label class="custom-control-label" style="color:black" for="pinocchietti">..../label>
                        </div>
                        <div class="form-check custom-control custom-checkbox mb-2">
                            <input type="checkbox" class="form-check-input custom-control-input" data-validation-required-message="Campo obbligatorio" id="kway" value=10>
                            <label class="custom-control-label" style="color:black" for="kway">...</label>
                        </div>
                        <!-- / checkboxes -->
                    </div>
                    <div class="col-md-6 mb-2">
                        <div class="form-group">
                            <p>Totale : <input type="text" value=0 readonly id="totale"> € </p>
                            <input type="hidden" value="Sacchetta porta kit" id="capo">
                        </div>
                    </div>



Aucun commentaire:

Enregistrer un commentaire