Jquery click event is not working properly
<p>I want a new text input box will be appended when i click onto the latest generated text box. </p>

<p>But It generates new text input box only when i click the first text input box. So, any solution?</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(event){
  $('.add-new').click(function(){
    $('.add-new').removeClass();
    $('form').append("&lt;br&gt;&lt;input type='text' name='user[]' class='add-new'/&gt;");      
  });
});

&lt;/script&gt;

&lt;div&gt;
  &lt;form method='post' name='login'&gt;
    &lt;input type='text' name='user[]' class='add-new'/&gt;
  &lt;/form&gt;
&lt;/div&gt;
</code></pre>
