title: How to append unique element of div to another div
body: <p>I have 2 div like
  <code>&lt;div id="destination" runat="server"&gt;&lt;/div&gt;</code> and <code>&lt;div class="errorDiv"&gt;&lt;/div&gt;</code></p>
  
  <p>I write a jquery function </p>
  
  <pre><code> $(document).each(function () {
              if ($("#destination").find("div").html() !== $(".errorDiv").html()) {
                  $("#destination").append($(".errorDiv"));
                  $("#error").append($("#destination"));
              }
          }).change();
  </code></pre>
  
  <p>In this function, if destination div contains errorDiv content skips, else append to destination. Then destination will append to another div. But, my check doesn't work . How can I append only unique elements of div? errorDiv content is produced in ASP page and this content is generic. </p>
  
  <p>While page is running I catch the some error messages and I want to append something about these messages to destination div. for example; if I catch </p>
  
  <pre><code> &lt;div class="errorDiv"&gt;A&lt;/div&gt;
   &lt;div class="errorDiv"&gt;A&lt;/div&gt;
   &lt;div class="errorDiv"&gt;B&lt;/div&gt;
   &lt;div class="errorDiv"&gt;B&lt;/div&gt;
   &lt;div class="errorDiv"&gt;A&lt;/div&gt;
   &lt;div class="errorDiv"&gt;C&lt;/div&gt;
  </code></pre>
  
  <p>contents I want to append only </p>
  
  <pre><code> &lt;div class="errorDiv"&gt;A&lt;/div&gt;
   &lt;div class="errorDiv"&gt;B&lt;/div&gt;
   &lt;div class="errorDiv"&gt;C&lt;/div&gt;
  </code></pre>
  
  <p>divs to destination div.</p>
  
  <p>But with my function, all divs are appended.</p>