2
I’m having a problem trying to transfer content from a DIV
editable for a textarea
with Jquery.
The code I’m using is this one:
function setData(id) {
id.className = "input editavel esse";
var valor = $(".esse").text()
$(".esse").next("td").children("textarea").text("\""+valor + "\"")
$(".esse").removeClass("esse")
}
This function is called in onchange
of div
works perfectly when I change the contents of the div
when typing, but when the content comes dynamically from the database (HTML Table) the function replaces the textarea
by the content instead of putting the same inside it.