title: JQuery: wrapping variable's contents
body: <p>I have a variable that contains a bunch of HTML that I retrieve from a HTML5 SQL database.</p>
  
  <p>I can <code>.append()</code> this to an element in the DOM and it appears fine. But I want to <code>.wrap()</code> the HTML contents first, thus I have written:</p>
  
  <pre><code>content = $(content).wrap(function() {
                                       return '&lt;div class="event_holder" /&gt;';
                                       });
  
  $('#mydiv').append(content);
  </code></pre>
  
  <p>However, I get the error</p>
  
  <p><code>Syntax error, unrecognized expression: ~HTML contents of variable~</code></p>
  
  <p>I have also tried:</p>
  
  <pre><code>content = $(content).wrap('&lt;div class="event_holder" /&gt;');
  </code></pre>
  
  <p>Would anyone know whats going on here and how I can correctly wrap this?</p>
  
  <p>EDIT: the contents of 'content' is:</p>
  
  <pre><code>&lt;input id="e1coords" class="coords" name="e1coords" type="hidden" value="-27.482359,153.024725"&gt;
  </code></pre>