Thanks Jörn,
It works, but for a specific and single event handler. If you take a
look at my previous example, you could see my problem is more generic.
Let me try to reformulate it : I wonder how to reload or refresh whole
or a part of the dom, manually or automatically, just after a DOM
modification.
Can you help me, please ? I mean, you already helped but if you got
time enough to clear up that jQuery point, I would really apreciate.
2007/1/23, Jörn Zaefferer <[EMAIL PROTECTED]>:
> Laurent Goussard schrieb:
> > Thanks for your answers !
> >
> > That's exactly what I was afraid to understand.
> > I can't imagine I'm the only one who wanted to add jQuery events on
> > html content loaded with jQuery. Am I ?
> Please take a look at my second example again:
>
> $("#trigger").click(function(){
> $("#content").append('<div class="test">click does not work</div>')
> // no ; here
> .find(".test").click(function(){
> alert("yeepee");
> });
> return false;
> });
>
> It searches for the formerly appended div inside #content, instead of
> looking everywhere. You can, by making the selector more specific,
> select only the div that was added latest (eg. ".test:last"), so it gets
> applied really only to the new div, not the ones that existed before.
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/