Can I add an event to an object before it is created?
<p>I have the following that is created dynamically:</p>

<pre><code>&lt;a class="editLink" href="/location/Edit?city=05"&gt;Edit&lt;/a&gt;
</code></pre>

<p>This and other editLink rows are created dynamically. </p>

<p>What I would like to do is add some jQuery to these:</p>

<pre><code>$(".editLink").button();
$(".editLink").click(function () {
    alert('edit link');
    return false;
});
</code></pre>

<p>Is there some way I can assign this BEFORE the elements appear? Also how can I deal with the following:</p>

<pre><code>$(".editLink").button();
</code></pre>

<p>When the .editLink is not already there.</p>
