How to addClass to an element that appears later in the page? : <p>I have the following jquery code:</p>

<pre><code>$('.kv-editable-reset').addClass('green');
</code></pre>

<p>which should add the class 'green' to this element:</p>

<pre><code>&lt;button type="button" class="btn kv-editable-reset"&gt;&lt;/button&gt;
</code></pre>

<p>but it does not work because .kv-editable-reset appears only later in the page, after click on the following button:</p>

<pre><code>&lt;button type="button" class="kv-editable-link"&gt;&lt;/button&gt;
</code></pre>

<p>How can I detect elements that appears in the page only <strong>after</strong> another element has been clicked?</p>
