title: What is the proper way to create div inside a div?
body: <p>Seems <a href="http://msdn.microsoft.com/en-us/library/ff986077%28v=VS.85%29.aspx" rel="noreferrer">Angle Brackets Are Not Allowed in the createElement Method</a> has some impact on plugins.</p>
  
  <p>I do not have the plugin, nor IE9 but for my own education, what is a proper way to code the following two lines in jQuery 1.6+</p>
  
  <pre><code>$('&lt;div id="'+options.loupeWrap.substring(1)+'"&gt;&lt;div id="'+options.loupe.substring(1)+'" /&gt;&lt;/div&gt;').appendTo(options.appendTo);
  $('&lt;div id="'+options.zoomWrapper.substring(1)+'" /&gt;').appendTo(options.loupe);
  </code></pre>
  
  <p>for example I have seen
  <code>$('&lt;div class="bla"&gt;&lt;/div&gt;')</code> but not <code>$('&lt;div id="bla"&gt;&lt;/div&gt;')</code> and am curious how to <strong>cleanly</strong> create a div with an ID and chain it to another div with an ID using the best practice jQuery possible and not just something that works because jQuery is very clever.</p>
  
  <p>I also checked out <a href="http://api.jquery.com/wrap/" rel="noreferrer">wrap</a></p>
  
  <p><a href="http://jsfiddle.net/mplungjan/BzeDe/" rel="noreferrer">This SEEMS to be valid and correct</a></p>
  
  <p>Is it?</p>
  
  <pre><code>$('&lt;div&gt;')
    .attr('id',outerID)
    .append(
      $('&lt;div&gt;')
      .attr('id',innerID)
    )
    .appendTo(options.appendTo);
  </code></pre>
  
  <p>Thanks for your input.</p>