title: jQuery create and append multiple elements
body: <p>I have created 2 divs, Div1(freeze) Div2(parent) and again 3 divs(loading, header, msg) appended it to Div2(parent). Entire divs in to body tag. Below are my code, I think there is some other best way to achieve this.</p>
  
  <pre><code>    var freeze = $('&lt;div/&gt;',{
          "class" : "freeze"
      });
      var parent = $('&lt;div/&gt;',{
          "class":"parent"
      });
  
      var loading = $('&lt;div/&gt;',{
          "class":"loadimg"
      }).appendTo(parent);
  
      var header = $('&lt;div/&gt;',{
          "class":"header"
      }).appendTo(parent);
      var msg = $('&lt;div/&gt;',{
          "class":"msg"
      }).appendTo(parent);
  
      $('body').append(freeze,parent);
  </code></pre>