Trying to understand Jquery appendTO
<p>I am kind of new to Jquery and am trying to understand appendTo().  </p>

<p>The problem is that when the form is submitted nothing is appended to the div. The code script works fine as long as no value is chosen, meaning the alert is triggered. </p>

<pre><code>$('#blankett_form').submit(function() {
    var id = $(this).find('.update:last').val();
    if (id == '') {
        alert('Välj land och region.'); 
    } else {
        var table = '&lt;table class="table table-hover table-bordered"&gt;&lt;thead&gt;&lt;tr&gt;    &lt;td&gt;blanketter.&lt;/td&gt;&lt;td&gt;datum tillagt.&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;'
        $(table).appendTo('#formsubmit');
    }
});
</code></pre>

<p>The table should be appended to the following div.</p>

<pre><code>&lt;div id="#formsubmit"&gt; 

&lt;/div&gt;
</code></pre>
