Hi so at success on my ajax call, it prepends the response:
$("#nowCurrentComment" + bID).prepend(msg);
Now, if you use the form that executes the ajax call more than once, then the first time that is prepended doesnt remove, but it just add the new prepended msg besides it..
I want to fadeout the old if exist and fadein the new. Is it possible?
So i dont it get like this:
When i pressed the submit button once:
Comment1
when i pressed twice:
Comment1Comment1
Sure, just don’t prepend the content. Switch a sub-element instead.
So if your DOM was…
Then your script would be…