title: jQuery Global Event Listener
body: <p>ttI have two functions like so:</p>
  
  <pre><code>function fn1() {
      $(".element").append("&lt;div class='trigger'&gt;&lt;/div&gt;");
  }
  
  function fn2() {
      $(".element").append("&lt;div class='trigger'&gt;&lt;/div&gt;");
  }
  </code></pre>
  
  <p>and one listener:</p>
  
  <pre><code>$(".trigger").click(function() {
      // do some magic with $(this) element
  });
  </code></pre>
  
  <p>The problem is that if click event listener is located outside fn1 and fn2 it doesn't see when dynamically created element (trigger) is clicked. </p>
  
  <p>How can I make event listener to listen globally?</p>