Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function game_over(){
- score = 0;
- $('.mole').unbind('mouseenter mouseleave');
- $('.mole').animate({'top':'100%'},300);
- $('.score').html('Game Over');
- $('.score').append('<div class="try_again">Try Again</div>');
- }
- $('.try_again').click(function(){
- startGame();
- });
- });
- function startGame(){
- $('.mole').on('mouseenter mouseleave');
- $('.mole').animate({'top':'0%'},5000, function(){
- game_over();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement