title: jquery event function to element that was added using .append()
body: <p>I have a function that appen some html code to my already existing div like so:</p>
  
  <pre><code>&lt;div id="my_ok_div"&gt;
  &lt;span&gt;click me&lt;/span&gt;
  &lt;div class="okay"&gt;ok&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>jQuery to add divs:</p>
  
  <pre><code>$('#my_ok_div').click(function(){
  $('#my_ok_div').append('&lt;div class="okay"&gt;bla&lt;/div&gt;&lt;div class="okay"&gt;bla bla&lt;/div&gt;');  
  });
  </code></pre>
  
  <p>also I have a function that work with div with class okay</p>
  
  <pre><code>$('.okay').click(function(){
    alert('all okay!'); 
  })
  </code></pre>
  
  <p>this perfectly work for already existed div with class okay that contains "ok" word.
  But, this not working for appended divs. Why and how i can fix this? Thanks.</p>