jQuery generated HTML not accessible by other jQuery calls
Hi,
I am having difficulty to figure out how to make jQuery generated html code accessible to jQuery.
example
-
$('#test_clickable').click(function(){
$('#test_load').html("<div id='test_load1'>Some Text </><br>Some other text");
});
Now I would like to trigger jQuery action when the code that has bean loaded in the "test_load" div is clicked i.e
-
$('#test_load1').click(function(){
$('#test_load2').html("Some Text Again");
});
However the jQuery is not responding when the "Some Text" that is loaded using the previous jQuery call is clicked. I suppose this is due to the code being generated on the fly, is there any way to make this work?
Thanks a lot for your help.
T.