Need total displayed amount of data-price attribute of each table – JavaScript – SitePoint Forums

I’m not 100% on Javascript and I’m a bit stuck on a feature I’m trying to do. I want to display the total amount of the data-price attribute. The code I currently have is below, sorry it’s a long code. The code is currently working so when I click add to list it adds the service name and cost to a table below and the same for the room name and cost table which are all good. I just need to somehow get the total amount of each table row from the service and parts table and display the amount below the tables. I’m sure the Javascript code can do what I need but I’m not sure what the code should be, can someone help me please

Service Name Service Cost
Part Name Part Cost
TOTAL AMOUNT HERE (WANT TO HAVE TOTAL AMOUNT OF EACH TABLE ROW FROM BOTH TABLE 1 AND 2 DISPLAYED HERE)


I just managed to solve this problem

Comments are closed.