Here is my code:
$(document).on('click', '.round', function() { var score = 0; score++; $('#result').html(score); this.remove(); }); It is necessary that when you click score increased by 1 and recorded in $('#result') .
But for some reason he only writes 1 and does not work anymore.
scoredestroyed when exiting the circuit, being a local variable? Because of this, it is re-created and initialized each time the handler is called. - ߊߚߤߘthis.remove();same thing - Poctuk