Here is my code:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<h1>Hello world!</h1>
<p>Here is a message: <span id="message"></span></p>
</body>
</html>
function nextMsg() {
    if (messages.length == 0) {
        document.write("Done");
    } else {
        $('#message').html(messages.pop()).fadeIn(500).delay(100).fadeOut(500, nextMsg);
    }
};
var messages = [
    "Hello!",
    "This is a website!",
].reverse();
$('#message').hide();
nextMsg();
The javascript simply runs through the given text strings and when done runs document.write("Done");
Notice that after the Hello!, and This is a Website! Are displayed, the document.write("Done"); function is displayed in a separate page removing all the HTML.
How can I display permanent text after the Hello and Website text appear..? Thanks for all the help!
 
    