Using Jquery to replace text in a div when a button is pressed
<p>I was wondering how using jquery I can replace text in a div with another piece of text when a button is pressed.</p>

<p>Div:</p>

<pre><code>&lt;div id="message"&gt;example message&lt;/div&gt;
</code></pre>

<p>Button:</p>

<pre><code>&lt;input id="hideshow" type="button" value="here" onclick="replaceWith();"&gt;
</code></pre>

<p>I want to replace "example message" with "test message"</p>

<p>I found this online but it didn't work:</p>

<pre><code>$('#notes').on("click", "#hideshow", function(e){
    $("#message").replaceWith("test message");
});
</code></pre>