It is necessary that when he poked on the circle it disappeared, and if it reaches 350px the game over was written. But the problem is that if I clicked and all the circles have disappeared, then the game over climbs anyway. How to fix?
$(document).on('click', '.round', function() { this.remove() }); $(document).ready(function() { $('.round').animate({ width: '350px', height: '350px' }, 6000, function() { $('#gameOver').show(); }); }); .round { height: 1px; width: 1px; border-radius: 50%; background: red; float: left; } .green { background-color: green; } .blue { background-color: blue; } .yellow { background-color: yellow; } h1 { text-align: center; font-size: 80px; color: red; margin: 30px 0; } <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <h1 style="display: none;" id="gameOver">Game over!</h1> <div class="round"></div> <div class="round green"></div> <div class="round blue"></div> <div class="round yellow"></div> <div class="round yellow"></div> <div class="round blue"></div>