title: How to create DOM tree from selector?
body: <p>How to create dynamically DOM elements (tree) from selector in JS?
  Selector will be different in any other cases.</p>
  <p>For example:</p>
  <pre><code>.first&gt;.second&gt;.third&gt;ul&gt;li
  </code></pre>
  <p>So in this case, I should get:</p>
  <pre><code>&lt;div class=&quot;first&quot;&gt;
      &lt;div class=&quot;second&quot;&gt;
          &lt;div class=&quot;third&quot;&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>After that I will be able to do 'appendChild' to body or some elements.</p>