I've been create a table row with jquery, the column id is the id of data that have been selected. How can i calculate the sum of 'total\_price' column which the id is dynamically (based on data id) ?

[![enter image description here](https://i.stack.imgur.com/OMvRa.jpg)](https://i.stack.imgur.com/OMvRa.jpg)

here my jquery script

```
function getCorporateService(id){
    //get data and parsing to column
    $.get("{{ url('salesorder/service')}}/"+id, function(data){
        console.log(id);
        console.log(data);
        $.each(data, function (index, element){

            $br = "<tr id='item'>";
            $br += "<td> <input class='input-small' type='text' id='order_identifier' name='order_identifier' readonly></td>";
            $br += "<td><input class='input-small' type='text' id='service["+id+"]' name='service["+id+"]' value='"+element.service_name+"' readonly></td>";
            $br += "<td><select id='order_type["+id+"]' name='order_type["+id+"]'> <option> - </option> <option value='add'>Add</option> <option value='change'>Change</option> <option value='cancel'>Cancel</option> </select></td>";
            $br += "<td><input class='input-small' type='text' id='select_plan["+id+"]' name='select_plan["+id+"]'></td>";
            $br += "<td><input class='input-mini' type='text' id='qty["+id+"]' name='qty["+id+"]' value='1' onChange='getTotalPrice("+id+")'></td>";
            $br += "<td><input class='input-small' type='text' id='unit_price["+id+"]' name='unit_price["+id+"]' onChange='getTotalPrice("+id+")'></td>";
            $br += "<td><input class='input-small' type='text' id='total_price["+id+"]' name='total_price["+id+"]' onChange='getTotalPrice("+id+")'></td>";
            $br += "<td><textarea class='input-small' id='notes["+id+"]' name='notes["+id+"]'></textarea></td>";
            $br += "</tr>";

            $(".corporatesvc").append($br);
        });
    });
}

```