Hey there actually i made a an html page on which there are two portion when i click in first portion the number increases and when i click in second portion the number in secon
you need to add negative
one when they click the button.
also change to just
or
Update: The problem is here!
-
you have the h3
nested inside the addPoints element.
you can not click on the h3 element without clicking on the addPoint element.
because the h3 is a child of the addPoints.
You NEED to remove it
you can still position it in the same place but when its not nested.
-
then add the appropriate javascript logic.
i would change addPoint() to addPoint(element_number, points_to_add)
so you do addPoint(1, -1)
actually i would change all the code.