Hi, Thanx for the tip ;) I realize now it's a common problem with jquery.
You talked about LiveQuery. According to you, what is the main difference with the quite new plugin LiveBind ? > otherwise make > sure that any newly-created elements are given notice of how the're > supposed to act when you introduce them to the document. I don't get you. Could you give me a short exemple to make it understandable ? regards, f. > > [1]http://brandonaaron.net/docs/livequery/ > > On Thu, Dec 4, 2008 at 11:06 AM, fabrice.regnier > > <[EMAIL PROTECTED]> wrote: > > > hi to all ;) > > > It seems that click function doesn't work on html element created on > > the fly with jquery. Where am i wrong ? > > > When i click on the checkbox from paragraph "P2", i got the alert. > > But when i click on the checkbox from paragraph "P1" created on the > > fly (when i submit a button), then i got no alert. > > > regards, > > > f. > > > Here is my code: > > > JQUERY Part: > > > $("#Idsubmit").click(function () { > > $("#P1").html('<input type="checkbox" value="soft_boo">soft_boo'); > > }); > > > $(":checkbox").click(function () { > > alert("foo"); > > }); > > > HTML Part: > > <input id="Idsubmit" type="button" value="afficher"> > > <p id="P1"></p> > > <p id="P2"><input type="checkbox" value="hard_boo">hard_boo</p>