This is my jquery for displaying a textbox on clicking anchor tag
$("a").click(function () {
var textbox = $('<input id="txt1" type="text" />')
var oldText = $(this).text();
$(this).replaceWith(textbox);
textbox.val(oldText);
$(this).html($('<input id="txt1" type="text" />').val())
});
My anchor tag
<a>hello</a>
Using this when textbox is displayed with text i want to change the text in the textbox and display back the new text of anchortag
Try this :
Here is the DEMO