I am using RoR with AJAX to create posts. So I need an ability to add an 'answers' by previous id.
Every time submit button clicked following code being called
selector looks like this
newanswer would be
First time it works as suggested, but when I click submit second time I need to use already appended
#answer-13 div to append newly
#answer-14, and it doesn't work. I understand that document doesn't know about first appended element, but have no idea how to resolve this issue. Thanks for any help.