javascript - Taking text from div, inserting into text area, for editing, textarea doesn't show? -


this part of simple notepad kind of widget , displaying text on div, when click div, should take text div , insert text area can edit , re-save. decided make php entry can edit/save/paginate. anyway have:

the alerts track evaluation progress

function editlastdoing() { var lastentry = $("#home-right-last-doing-tab").text(); alert(lastentry); $("#home-right-last-doing-tab").text(''); $("textarea#last-doing").val(lastentry); alert('tried set text area html'); var currentvalue = $("textarea#last-doing").text(); alert(currentvalue); document.getelementbyid('last-doing').style.display = "inline-block"; $("textarea#last-doing").css('display','inline-block'); alert('done'); } 

i don't reach "done"

$(document).ready(function() {     $("div").on("click", function() {         $("textarea").text($("div").text());     }); }); 

http://jsfiddle.net/p4nz5yf5/2/


Comments