I'm trying to make a little game in Jquery, I want to show a dialogue box. 

1. When I press enter, I want the text1 to appear.
2. I press enter again it shows the text2 etc, until maybe 7 texts.

If I press enter, I get immediatly text2, which is obvious, and I dont know how to figure this out.

Also if you have suggestions of a better optimised solution in Jquery, feel free to submit it, I'm a new student.

Thanks all !

```js
var i = 0;
$(document).keypress(function(e) {
    if(e.which == 13 && i == 0) {
     $( ".text" ).empty();
        $( ".text" ).append( "Text1" );
        i++;
    }
});
$(document).keypress(function(e) {
    if(e.which == 13 && i == 1) {
     $( ".text" ).empty();
        $( ".text" ).append( "Text2" );
        i++;
    }
});
```