See here:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

On Tue, Dec 22, 2009 at 1:37 PM, Diego <diegosvie...@gmail.com> wrote:
> I have the following snippet of code:
>
> This is where I'll place the 'li' elements.
> <ul id="file-list"></ul>
>
> After processing the file upload I add the elements like this:
> $("#file-list").append('<li>' + fileName + ' <a href="' + filePath +
> '" class="file"><img src="attributes.gif" alt="" /></a></li>');
>
> The thing is, I can't get the onclick event on those links, it just do
> nothing when I click on it.
>
> If I already have a
> <ul id="file-list"><li>MyFile <a href="something.zip"
> class="file"><img src="attributes.gif" alt="" /></a></li></ul> <--
> Works fine.
>

Reply via email to