title: Jquery: Click event doesn't work after append. (Don't know how to use .ON)
body: <p>I have 2 click events. One appends an IMG which includes another click event. It doesn't work obviously. I know that I have to use jQuery's .ON, but I just can't figure out how and where.</p>
  
  <p>My code:</p>
  
  <pre><code>$( document ).ready(function() {
      // The one below (.choimh) isn't triggered anymore
      $('.choimg').click(function(){
  
      });
  
      // Switch to chosen color
      $('.color').click(function(){
          $(".thumbs").append('&lt;a href="#"&gt;&lt;img id="image'+u+'" class="choimg" src="/img/products/mini/'+colnumber+'-'+ i + '.jpg" /&gt;');
      });
  });
  </code></pre>
  
  <p>The .color div is on a completely different place than .choimg.</p>
  
  <p>I just can't figure out how to use .ON.</p>