I have a wall that shows messages from users in two columns. Each message is a div box.
I have given the id of each box the id of the message.
When a user clicks edit for a message a form should be place on the page using Ajax.
The form is as wide as the two message columns.
If a user edits a message that is on the left column I can insert the form before this message to the left.
However if the message is on the right I need to insert the form at the beginning of the left message and above it.
How can I do this using jquery?
Rails 3 js.erb
Maybe I miss something but if you know the id of the left message you can easily use