Using Jquery in Jquery output

Using Jquery in Jquery output

Hi everybody,

I would like to use Jquery in an Jquery output

Something like this:
  1. $('#writeroot').html('<a href="#" class="open">Open</a>');

  2. <div id="writeroot"></div>

When the output is put intro the div I would like to use jquery again, using this function
  1. $('.open').click(function(event){
          alert("Hello");
    });


This doesn't work, does anybody know how to deal with this?