How to add text to dynamically created DOM objects?
<p>Say I have two buttons "Add Link" and "Add Text". The "Add Link" button automatically appends the following to the existing page:</p>

<pre><code>&lt;a href="text.html"&gt;&lt;/a&gt;
</code></pre>

<p>When i click on the button "Add Text", the text of all dynamic links created should contain the text "Text". </p>

<p>I originally use "$("a").text("Text")" for the function of the "Add Text" button, but it does not work because the links are dynamically created as the user clicks the "Add Link" button. </p>

<p>How do I make it so that I can get "Text" into all of the dynamically created link?</p>

<p>NOTE: Something Like this</p>

<pre><code>$('buttonforaddtext').live('click', function() {
    $("a").text("Text");
});
</code></pre>

<p>Does not work for me because the button has been there the whole time, its the "a" that are dynamically created with the click of the "Add Link" button.</p>
