Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h4>Стоимость</h4>
- <p class="price">
- <span id="final_price_yslug">0</span> Руб.
- </p>
- <label for="yslygi">Верхняя торцевая перегородка</label>
- <input type="checkbox" class="a1" id="yslygi" name="peregorodka"/>???<br/>
- <label for="yslygi2">Борта у стены</label>
- <input type="checkbox" class="a1" id="yslygi2" name="bort" />???
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
- $('input.a1').on("click",function(){
- var sum2 = 0;
- if ($("#yslygi").is(':checked')) {
- sum2 += 500;
- }
- if ($("#yslygi2").is(':checked')) {
- sum2 += 500;
- }
- $('#final_price_yslug').html(sum2);
- });
- $('input.a1').eq(0).click();
- $('input.a1').eq(1).click();
- $('input.a1').on("click",function(){
- ...
- });
- $('input.a1').eq(0).click();
- // или через id
- $("#yslygi").click();
Add Comment
Please, Sign In to add comment