Ajax replace instead of append

Viewed 88267

I used the following jQuery example which works like a charm. However it appends the results. What do I need to change to replace the results instead of appending?

4 Answers

Empty function before your append or prepend function.

I tried this & it worked --->

frame is id selector & it append image.

$("#frame").empty().append('<img src="" >' ); 
Related