title: How to add ::before pseudo element on elements created dynamically by jQuery
body: <p>I am creating some elements dynamically with jquery. (say with id <code>test_element1</code>, <code>test_element2</code> and so on..)</p>
  
  <p>I have the below CSS -</p>
  
  <pre><code>div[id^=test_]:before  {
      content: "";
      height: 100%;
      width: 100%;
      box-shadow: #aaaaaa 0px 0px 10px inset;
      position: absolute;
      left: 0px;
      top: 0px;
      z-index: -1;
  }
  </code></pre>
  
  <p>The <code>::before</code> element does not show up when I inspect the element. It shows up only if the <code>test_element1</code> is already present in my HTML (ie. static content).</p>
  
  <p>How do I make the <code>::before</code> appear for my dynamic elements ?</p>