This is what I am trying to get: when you click #edit jQuery finds in the closest tr the td called #collapse, and replaces its content with an input which has as value the previous #collapse html.
I tried on jsFiddle without any success: http://jsfiddle.net/8PDdn/1/
Can anyone help me to get what I wanted to get?
preventDefault()is one of the methods of theeventobject not the selected element, you should call it for theeventobject instead, also you can use theblurevent of the input for modifying contents of the div tag after editing:Fiddle