title: How to fix automatically closing div tag in this case
body: <p>I have a question about appending data to a div in my html through jquery.</p>
  
  <p>This is what I have in my <strong>html</strong> file:</p>
  
  <pre><code>&lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="span12"&gt;
                  &lt;div class="row"&gt;
                      &lt;div id="errors" class="text-error"&gt;&lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my <strong>javascript</strong> file: </p>
  
  <pre><code>function checkCompletion(data){
  
      // IMPORTANT VALUES
      var app_important = ["submit_description", "app_icon", "address", "email"];
      var event_important = ["name", "datefrom", "dateto", "description", "email"];
  
      $("#errors").append("&lt;div class='span6'&gt;&lt;div class='well'&gt;");
  
      // LOOPS + HEADERS
      $("#errors").append("&lt;h3&gt;App&lt;/h3&gt;");
      doLoop(data.app, app_important);
  
      $("#errors").append("&lt;h3&gt;Events&lt;/h3&gt;");
      doLoop(data.events, event_important);
  }
  
  // ar           =&gt; app data array
  // ar_important =&gt; important props app (array)
  function doLoop(ar, ar_important) {
      $.each(ar, function(value) {
          $.each(ar_important, function(i) {
              if(ar[value][ar_important[i]] == '') $("#errors").append("&lt;p&gt;" + ar_important[i]+" is missing&lt;/p&gt;");
              //else $("#errors").append("&lt;p&gt; :) "+ar_important[i]+"&lt;/p&gt;");
          });
      });
      $("#errors").append("&lt;/div&gt;&lt;/div&gt;");
  }
  </code></pre>
  
  <p>The data parameter is a JSON object with lots of data.<br>
  As you can see I do <code>$("#errors").append("&lt;div class='span6'&gt;&lt;div class='well'&gt;");</code></p>
  
  <p>But the div tag automatically closes so my errors aren't in it.<br>
  Does anyone know how I can fix this and still work with append?</p>
  
  <p>Niels</p>