1
Good afternoon, according to this topic - /questions/203969/replicar-conte%C3%Bado-de-val-em-span I have the following code
$('textarea.skills_knowledge').blur(function() {
var skills_knowledge = $(this).val();
$('span.skills_knowledge').html(skills_knowledge); });
would like to know how to preserve line breaks, ie if you press enter in the text area, appear this in span properly one below the other
I don’t know if it’s the best format, I accept suggestions for improvement, but I found this format in topical -/questions/40803/uso-de-val-no-script-me-faz-quebras-linha?rq=1
$('textarea.skills_knowledge').blur(function() {
var skills_knowledge = $(this).val();
var skills_knowledge = skills_knowledge.replace(/\r?\n/g, '<br />');
$('span.skills_knowledge').html(skills_knowledge); });
I’m not sure if this will help, http://jsfiddle.net/Wm9um I’m going to run some tests
– flourigh