The script was designed to use the totalprice class name for the span that contains the total.
You can either adjust the name that’s used in the HTML code. or you can adjust the name that the JavaScript uses.
Either way, it is only the span around the total value that must be targeted.
thank you so much for helping me by going out of the box and writing the whole javascript code for me.
Although I hardly understand only 5% of what you have written, but I have started studying very aggressively so that down the line I will be able to write my code.
I have started from this location →
This post shall remain active for 3 months so I will grasp the fundamentals ASAP and will come back to discuss any unclear things.
Thanks again for motivating me enough to start learning javascript.