I am using the code below to display HTML from the click of a radio button. The displayed HTML uses additional jQuery event calls, but the event calls (keyup or click) in the generated HTML will not work.

At what point are you executing your bind? if the document isn't ready, the bind listener will not work....

spiderling
—
2011-02-25T18:17:09Z —
#3

Sorry. I do have the document ready. I forgot to include it. So...

$(document).ready
(
function()
{
// code from original post
});

TommiChi
—
2011-02-26T08:03:36Z —
#4

Oh, (duh) I had a moment where I was not paying attention. The problem lies with a scoping issue in your generated code. As it is added to the page after the bind, your event listener will not recognize it. You have the option of doing 2 things:1. You the "live" method instead, that also detects any future instantiations on the page of the target element. $(elem).live('keyup click', functio() {});2. place your second bind listener at the end of the function that gets executed, therefore after you have already inserted the new element