Jquery manipulation with previously jquery loaded data

Jquery manipulation with previously jquery loaded data

Hello, how to do if I load some data with jQuery and  again handle this data again with jquery? It is possible?

Here is my example:

...
...
  1. <body>
  2. <h1>Test jQuery</h1>

  3. //jscript start//
  4. $(function(){
  5. $("#img1").click(function(){
  6. $("#img1").hide();
  7. $("#target").replaceWith('<p id="target2">Hello</p>'+'<img id="test2" src="cross.png" alt="cross.png, 655B" title="Cross" border="0" height="16" width="16">');
  8. });

  9. $("#test2").click(function(){
  10. alert("OK");
  11. });

  12. });
  13. //jscript end//

  14. <img id="img1" src="cross.png" alt="cross.png, 655B" title="Cross" border="0" height="16" width="16">
  15. <p id="target">This is a test</p>


  16. </body>
..
..

Thanks