I am working on Asp.net MVC4 application. I have user's information and edit button in case any user wants to edit his/her information.
A user can edit his/her information by double clicking on it also. Suppose if a username is there then user can edit it by clicking double on it. As soon as he clicks on UserName it is editable with its value in a textbox.
How can i make value editable with textbox?
I tried-
$(function(){
$('.double').on('dblclick',function(){
var val=$(this).html();
$(this).append('<input type="text" value=val/>');
});
});
But no success.