title: Delete particular button (from DOM) on click
body: <p><a href="https://jsfiddle.net/9f1hakoy/" rel="nofollow noreferrer">DEMO</a></p>
  
  <p><code>createBtns</code> function create as many buttons as <code>data</code> array is long.</p>
  
  <p>What I want to do is to delete (from DOM) single button when we click on it. The problem is all buttons has the same class, they are all the same, except text value inside of each. There should be a way to get to know which button has been clicked and delete this and only one, but I don't know it.</p>
  
  <p>There is <code>btnClick</code> function which should do it (it alerts for now). </p>
  
  <pre><code>var data = [
    {name: "Date", value: "12/31/2018", type: "visible"},
    {name: "Car", value: "Ford", type: "visible"},
    {name: "Country", value: "Russia", type: "visible"},
    {name: "Age", value: "20", type: "visible"},
  ];
  
  var outer = $(".outerPanel");
  
  var createBtns = () =&gt; {
      for (var i = 0; i &lt; data.length; i++) {
      var btn = $('&lt;div class="btn"&gt;&lt;/div&gt;');
      var name = data[i].name;
      var value = data[i].value;
  
      btn.html(name + ": " + value);
      btn.click(() =&gt; btnClick());
      outer.append(btn);
    }
  }
  
  var btnClick = () =&gt; {
      alert("test");
  }
  
  createBtns();
  </code></pre>