title: use querySelectorAll on dynamically added element
body: <p>I want to query newly added div having memberCard class call but queryselectorall being static , i am not able to do so .How to resolve this problem?</p>
  <pre><code>var  elementsToShow = document.querySelectorAll('.memberCard')
  function list(){
  $.ajax({
      url:`http://localhost:8000/members`,
      type:&quot;GET&quot;,
      success:function(members){
        
        members.forEach(member =&gt; {
        
          
          // Construct card content
           content = `
          &lt;div class='memberCard'&gt;
            &lt;div style='background-image:url(&quot;${member.image}&quot;)' class='memberImage'&gt;
            &lt;/div&gt;
            &lt;div class='memberDetails josephine-sans'&gt;
              &lt;h5&gt;${member.name}&lt;/h5&gt;
              &lt;h6&gt;${member.batch}&lt;/h6&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          `;
                container.innerHTML += content;
        });
  
  }
  </code></pre>