I have a (probably) very easy problem to fix, but I can't figure out what's wrong. I try to run .click() jquery but it does not trigger. I think it's because the actual DOM items get created dynamically with javascript (does it matter?).
the dynamically created content is:
<div class="rPics">
    <div class="class">
        <canvas id="canSSJ01" class="thumbCan" width="600" height="720"></canvas>
        <p class="cDID hidden">SSJ01</p>
    </div>
    <div class="class">
        <canvas id="canSSJ02" class="thumbCan" width="600" height="720"></canvas>
        <p class="cDID hidden">SSJ02</p>
    </div>
</div>
Javascript:
$('.class').click(function(){
  globalJID = $(this).children(".cDID").text();
  console.debug("clicked thCC: "+globalJID);
});
Now when I check chrome, it does not trigger the .click function at all :(
what am i doing wrong?
 
     
     
     
     
    