Call function from dynamically created element
<p>I'm wondering which is the best way to call a function for each of these element in the code below:</p>

<pre><code>    for (var y=1; y &lt;= 24; y++) {       
    $("#christmasCalendar").append("&lt;div class='span2'&gt;&lt;h1&gt;&lt;a href='#' data-toggle='tooltip' class='thumbnail' title='Click to add a question for this day'&gt;"+y+"&lt;/a&gt;&lt;/h1&gt;&lt;/div&gt;")  
    }
</code></pre>

<p>Like if I want to call this function:</p>

<pre><code>    $("#createChristmasDayQuiz").click(function () {
    $("#QuizGuideInfo").delay(1000).fadeIn('slow');
    $("div.infoHolder").html('&lt;i class="fa-icon-bullhorn"&gt;&lt;/i&gt;Select a color theme for your christmas calendar. This can be changed later.').hide().fadeIn('slow');
    $('#createQuiz').modal('show');
    });
</code></pre>

<p>I know they can't have the same ID, but still, which is the best solution?</p>

<p>Thanks in advance!</p>
