What is the problem between js presentation and text () addition?

I use js to print a small account to follow.
this is the event: I sent with click

.
$(".cart_subtotal_"+prod_id).html(newVal*price);

newVal is quantity
price is commodity unit

so it will grow like this (this is a follow-up)

clipboard.png

HTML

clipboard.png

there is no problem with
but now it is time to add all these values cart_subtotal , and then print them elsewhere
how can I add these values at the same time as I click
?
this is what I think of.

var subtotal = parseInt($(".subtotal").text());
    $(".total-price-display").html(subtotal);

(I added subtotal in cart_subtotal)
is unable to execute
thought is dead
what is the function that can achieve this effect?

Mar.22,2021

$('.subtotal') gets a collection

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31d58-2bdde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31d58-2bdde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?