Question: I have some code. When it runs correctly, I create a success message and use prependTo in order to display it on the screen. The problem is that when the user does their successful action twice, I end up with two success messages.

Is there a way to overwrite my success message. Here is how I currently handle it in my code:

```
  $((is_error ? "<p class=' alert alert-error'>"+message+"</p>)" : "<p class=' alert alert-success'>"+message+"</p>")).prependTo("#feedback-container");

```

Thanks!

Answer: 
You can use simply this :

```
$("#feedback-container").html((is_error ? "<p class=' alert alert-error'>"+message+"</p>)" : "<p class=' alert alert-success'>"+message+"</p>"));

```

So the entire content of your container is replaced.
```
$("#feedback-container").children(".alert:first-child").remove().end().prepend( "stuff" );

```

Working demo <http://jsfiddle.net/uVVYN/>