Jquery display image problem

Posted by Sergio on Stack Overflow See other posts from Stack Overflow or by Sergio
Published on 2010-02-24T13:55:00Z Indexed on 2010/03/26 2:33 UTC
Read the original article Hit count: 410

Filed under:

Hello,

I have PHP page where users can upload photos (using Ajax & PHP script). Those uploaded photos (thumbs) are shown after upload in DIV below upload field.

Then, after hitting send button I want to clone that DIV at that same page at message board, bellow other messages with or without uploaded photos.

When I try to do that with:

var pht = $("#photos").clone().addClass('p_pht');

and try to display sent photos bellow sent message like this:

$("div#wall").append('<div class=msg>'+ message +'</div><div class=n_pht>'+ pht +'</div>');

I get Jquery error message "[object Object]" in place where the photos should be displaying.

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about jQuery