title: After clicking. A function is called multiple times ... Why?
body: <p>Okay friends. I need your thought here. The code has two simple
  actions. The first action adds ADD after the click. Second action
  Click X with any number. Now that a second action is called. The code
  should only be printed once! What a worker does not read has a call of
  several times! Can anyone explain why?</p>
  
  <p>I took the same code .... with another HTML code with 3 DIV that
  already exist. And the code works fine.</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 count = 1;
  $(document).ready(function() {
    $("#add").on("click", function() {
      $("#items").append('&lt;div&gt;&lt;input/&gt;&lt;button class="btn_x"&gt;X' + count + '&lt;/button&gt;&lt;/div&gt;&lt;/br&gt;');
      count++;
  
      $(".btn_x").on("click", function() {
        console.log($(this).html());
      })
    })
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://code.jquery.com/jquery-3.1.1.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;button id="add"&gt;Add&lt;/button&gt;
  &lt;div id="items"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>