Check out this link, it's just what you need:
http://docs.jquery.com/FAQ#Why_do_my_events_stop_working_after_an_Ajax_request.3F

Cheers

--
Ariel Flesler
http://flesler.blogspot.com/

On 25 jun, 03:29, jebberwocky <[EMAIL PROTECTED]> wrote:
> Hello all
>
> I have following:
> $(document).ready(function() {
> ...
> $(".bar").click(function(){
>         $.get("/foo" ,{foo:$(this).attr("test")},
>               function(data){$("#bar").html(data); // data = <a class="bar"/>
>          });
>
> });
> ...
> }
>
> and html:
> <div id="bar">
> <a class="bar"/>
> </div>
>
> It works fine at first! But, after the $.get(...). the onclick seems
> not registered on <a class="bar"/>
>
> Does anyone know how solve this?

Reply via email to