title: Append div container with child elements to web page?
body: <p>I'm trying to create a button that will dynamically add a div container to the webpage, and currently i'm doing that with code that looks like this inside a .click() event:</p>
  
  <pre><code>$("&lt;div id = 'some_id'&gt;&lt;/div&gt;").appendTo("#somecontainer");
  </code></pre>
  
  <p>which is working fine for now. However, I know that later on I will be adding more elements inside this div container (up to 3 or 4) so I'm wondering if there's a better, cleaner way to do this. Otherwise I'm thinking that my append statement will start to look something like this:</p>
  
  <pre><code>$("&lt;div id = 'some_id'&gt;&lt;div id = '1'&gt;&lt;div id = '2'&gt;...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;").appendTo("#somecontainer");
  </code></pre>
  
  <p>which not only seems wrong, but is hard to structure. Any thoughts?</p>
  
  <p>Edit: by the way, these child elements will end up being standard text/icons that are the same across all of these newly created containers, the only thing that is changing will be some inputted text inside.</p>