How to make a restriction on the choice of the checkbox and the text palenie?

There is a list of products. When choosing two worth more than 7000, you should see the text "you selected amounting to more than 7000". Later select everything breaks. Link attached.
March 19th 20 at 08:40
1 answer
March 19th 20 at 08:42
Because you re-summarize all the prices in the variable sum,
then you need to reset it every time.
And you reset only once at the beginning of the script, not when you click.
Thank you - Constance.Moo commented on March 19th 20 at 08:45

Find more questions by tags jQueryJavaScript