I am trying to set a timeout on the following append method in jQuery. Everything I’ve tried keeps returning Uncaught SyntaxError: Unexpected identifier
Here is my code:
setTimeout("$('#user-comments').append('<div class='video_comment'>
<div class='name'>David</div><div class='time'>test</div>
<div class='indiv-comment'><p>'"+message+"'</p></div></div><hr class='gray' />')",3000);
Any help is appreciated.
1 Answer