jquery: concatenating with insertAfter()
<p>Objective: When 'Submit' is clicked, add the contents of the textbox below the button into a h3 element.</p>

<p>So I made a variable <code>contents</code> which takes in the value from the textbox. When I click the submit button, it should insert the <code>h3</code> element with <code>contents</code> inside it. I'm not sure if it's something with concatenating in jquery or if there's something else I'm missing here. Apologies since I'm still new to jquery.</p>

<pre><code>$(document).ready(function() {
  var contents = $('#textInput').val();
  $('#submitBtn').click(function() {
    $("&lt;h3&gt;" + contents + "&lt;/h3&gt;").insertAfter('#submitBtn');
  })
})
</code></pre>

<p>What seems to be the problem here?</p>

<p>Thanks.</p>