Jquery function problem
<p>I have a problem with this Jquery function.
The the simplifide code looks like:</p>

<pre><code>$(document).ready(function(){

    $(".brs").toggle(function() {
        var commid=$(this).attr('kid');
        $('.comment'+commid).html('the new text - &lt;a href="javascript: void(0)"  class="brs2" kid="'+ commid +'"&gt;click to change the text&lt;/a&gt;');
    }, function () {
        var commid=$(this).attr('kid');
        $('.comment'+commid).html('new text');
    });

    $(".brs2").click(function() {
        alert("test"); 
    });

});
</code></pre>

<p>HTML code:</p>

<pre><code>&lt;div class="comment1"&gt;some text&lt;/div&gt; | &lt;a href="javascript: void(0)"  class="brs" kid="1"&gt;test link&lt;/a&gt;
</code></pre>

<p>When the text changes in the div "comment1" the link that runs another function (class "brs2") does not work. What could be the problem?</p>

<p>Thanks for all sugestions.</p>

<p>EDIT:</p>

<p>If the Jquery code looks like:</p>

<pre><code>$(document).ready(function(){
$(".brs").toggle(function() {
var commid=$(this).attr('kid');
$('.comment'+commid).html('the new text - &lt;a href="javascript: void(0)"  class="brs" kid="'+ commid +'"&gt;click to change the text&lt;/a&gt;');
}, function () {
var commid=$(this).attr('kid');
$('.comment'+commid).html('new text');
});

$(".brs2").click(function() {
alert("test"); 
});

});
</code></pre>

<p>And the HTML:</p>

<pre><code>&lt;div class="comment1"&gt;some text&lt;/div&gt; | &lt;a href="javascript: void(0)"  class="brs" kid="1"&gt;test link&lt;/a&gt;
</code></pre>

<p>I can't use live() to trigger the same toggle function with new link that appears in comment1 div?</p>
