Answers for "table.column(9, {selected: true}).data().sum()"

0

table.column(9, {selected: true}).data().sum()

$('#example tbody').on('click', 'tr', function () {

        var price = parseInt(($(this).find('td').last().html()).replace(/\$|,/g, ''));
        if($(this).hasClass('selected')) {
           sum -= price;
        } else {
           sum += price;
        }
        $('.sum').html(sum);
        $(this).toggleClass('selected');
} );
Posted by: Guest on February-25-2021

Code answers related to "table.column(9, {selected: true}).data().sum()"

Browse Popular Code Answers by Language