How to hide an dom element after creating it on the fly with Jquery?
<p>I am trying to build a form where users can add a text field by clicking on a "add option" button. They can also remove added fields by a "remove option" link created on the fly by Jquery, along with the text field. My code looks like this :</p>

<pre><code>$(document).ready(function(){
       $("#add_option").click(function(){
               var form = $("form");
               var input_field = '&lt;input type="text" /&gt;';
               var delete_link = '&lt;a href="#"&gt;remove&lt;/a&gt;';
               form.append(input_field + delete_link);

               return false;
           });

      $("a").click(function(){
              alert('clicked');

              return false;
          });
  });
</code></pre>

<p>This code is not working : when I click on the "add_option" button, a new text field and the  "delete_link" appear. But when clicking on the "delete_link" created by JQuery, the browser follows the link instead of launching a pop-up displaying "clicked". Any idea ?
Thanks !</p>
