I need to round the number that ends up
$("#total_video span").Math.round(summ); code itself
$(function(){ $('#subscribe_video input:checkbox').on("change", function(){ var summ = 35.99; $('#subscribe_video input:checkbox:checked').each(function(index, element){ var add = parseInt($(element).val(), 10); if(!isNaN(add)) summ += add; }); $("#total_video span").text(summ); }) });
var summ = 36; ... $("#total_video span").text(summ);- Igor