title: Copy selected checkboxes into another div
body: <p><a href="http://jsfiddle.net/pxzt8kvp/" rel="nofollow">http://jsfiddle.net/pxzt8kvp/</a></p>
  
  <p>This code is for a form where the user can select various things and have a display of their current selection. I would like it to display the actual element instead of the element's text, as eventually it will be an image thumbnail.</p>
  
  <p>I found code similar to what I need, although it only puts the text values into another div. I need the actual input elements, not just the plain text. I've tried removing the .text() from the javasript but that doesn't copy anything to the div.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="ctl00_ContentPlaceHolder1_divServices" style="width:450px; height:250px; overflow-y:scroll;"&gt;
      &lt;input id="1" type="checkbox" name="1"/&gt;&lt;label for="1"&gt;&lt;div id="thing"&gt;One&lt;/div&gt;&lt;/label&gt;
      &lt;input id="2" type="checkbox" name="2"/&gt;&lt;label for="2"&gt;&lt;div id="thing"&gt;Two&lt;/div&gt;&lt;/label&gt;
      &lt;input id="3" type="checkbox" name="3"/&gt;&lt;label for="3"&gt;&lt;div id="thing"&gt;Three&lt;/div&gt;&lt;/label&gt;
      &lt;input id="4" type="checkbox" name="4"/&gt;&lt;label for="4"&gt;&lt;div id="thing"&gt;Four&lt;/div&gt;&lt;/label&gt;
  &lt;/div&gt;
  &lt;div id="selectedServices"&gt;
      &lt;p&gt;Result:&lt;div id="myDiv"&gt;&lt;/div&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>$(function() {
    $(":checkbox").change(function() {
      var arr = $(":checkbox:checked").map(function() { return $(this).next().text(); }).get();
      $("#myDiv").text(arr.join(', '));
    });
  });
  
  function ToggleBGColour(item) {
      var td = $(item).parent();      
      if (td.is('.rowSelected'))      
          td.removeClass("rowSelected");      
      else        
          td.addClass("rowSelected");     
  }
  </code></pre>