title: I want to delete multipale button on click onebyone not delete it all by one click
body: <p>I manage to delete button with  <code>&lt;li&gt;</code> element <code>class li_listItem&quot;</code>. But my aim is to on click delete <code>&lt;button&gt;</code> itself and also <code>&lt;li&gt;</code> element with it. For now I  can only delete both elements only by clicking on it. Can you help me with it?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var ul = document.querySelector('#shopping_list__items');
  
  function DeleteButtonOnclick(e) {
    const trgt = e.target.closest('.deleteBtn, .li_listItem');
    if (trgt) trgt.remove();
  }
  
  ul.addEventListener("click", DeleteButtonOnclick);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul id="shopping_list__items"&gt;
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem" random="23"&gt;Notebook&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem"&gt;Jello&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem"&gt;Spinach&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem"&gt;Rice&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem"&gt;Birthday Cake&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div class="flex"&gt;
      &lt;li class="li_listItem"&gt;Candles&lt;/li&gt;
      &lt;button class="deleteBtn"&gt;Delete Button&lt;/button&gt;
    &lt;/div&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>