Using Jquery on jQuery generated ck te t
<p>I have a relatively simple upload form where people can click on a button, so an extra upload field is being created in a different div:</p>

<pre><code>$("#extraf").click(function(){
  $("#file2").append('&lt;input type="file" name="file[]" id="files2" size="30" /&gt;');
});
</code></pre>

<p>But when people select their file, i want them to see what the name of the file is,
i looked trough several topics on StackOverflow and needed to use '.on()'. But it's still not working with the following code:</p>

<pre><code>$("input:file").on("change", function(){
  alert( $(this).text() );
}); 
</code></pre>

<p>or with</p>

<pre><code>$("#files2").on("change", function(){
  alert( $(this).text() );
}); 
</code></pre>

<p>I don't even get the alert, so i assume something is wrong, can somebody help me with this?</p>

<p>Thanks,
Regards,
Yannick</p>
