I am having three div with content editable option and I want that text of 1st div = text of 2nd div = html of 3rd div. I am able to do it in two lines of code but code is not working when I am trying to convert it into single line. Please take a look at my code.
// Working Code
$("#img1").keyup(function() {
$("#dimg1").html($(this).text());
$("#oimg1").text($(this).text());
});
// Not Working
$("#img1").keyup(function() {
$("#dimg1").html($("#oimg1").text($(this).text()));
});