set text to div jquery code example
Example 1: jquery get element innertext
const copiedText = $('#element').text();
Example 2: how to put html inside jquery text
$('div.demo-container').html('<p>All new content. <em>You bet!</em></p>');
const copiedText = $('#element').text();
$('div.demo-container').html('<p>All new content. <em>You bet!</em></p>');