jquery - Add multiple value from group two and one from group 1 with radio and checkbox -


i have used html , javascript code this post @ my test website.

i want change radio button second group checkbox, user can select multiple option group 2 , should add 1 value of radio button selected group 1 , 1 or more values selected through checkboxes in group two, adding 1 values of check box. please check test url understand issues. want place paypal code payment total sum, should place that. if want have 3 groups in future, do. please take time this. new javascript.

demo

$('#b1').click(function () {     var total = 0;     $("input[type=radio]:checked").each(function () {         total += parsefloat($(this).val());     });     $('input[type="checkbox"]:checked').each(function () {          total += parsefloat($(this).val());     });     $("#totalsum").val(total); }); 

demo

$('input[type="checkbox"],input[type=radio]').change(function () {     var total = 0;     $("input[type=radio]:checked").each(function () {         total += parsefloat($(this).val());     });     $('input[type="checkbox"]:checked').each(function () {          total += parsefloat($(this).val());     });     $("#totalsum").val(total); }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -