title: why is jQuery click event firing multiple times
body: <p>I have this sample code here
  <a href="http://jsfiddle.net/DBBUL/10/" rel="noreferrer">http://jsfiddle.net/DBBUL/10/</a></p>
  
  <pre><code>    $(document).ready(function ($) {
  
      $('.creategene').click(function () {
  
          $('#confirmCreateModal').modal();
  
          $('#confirmCreateYes').click(function () {
              $('#confirmCreateModal').modal('hide');
  
              var test = "123";
              alert(test);
              console.log(test);             
          });
      });
  });
  </code></pre>
  
  <p>If you click the create button 3 times and each time you click yes on the confirmation, the alert is fired multiple times for each click instead of just one time.</p>
  
  <p>If you click the create button 3 times and each time you click no and on the 4th time you click yes the alert is fired for each of the previous clicks instead of just one time.</p>
  
  <p>this behavior seems weird to me as i would expect the alert to be fired once per click. Do I have to use .unbind() or is there a better solution?</p>
  
  <p>Could someone please tell me why this is happening and how to fix it?</p>
  
  <p>Thanks</p>