jQuery - text()

The text() sets or returns the text content of selected element(s). Unlike the .html() method, .text() can be used in both XML and HTML documents. The result of the .text() method is a raw string containing the combined text of all matched elements.

Hello World - this will be updated

Chewbacca dooku darth chewbacca luuke c-3po luke moff. Maul vader c-3p0 secura. Jango ackbar wicket kessel k-3po. Antilles padmé solo k-3po jawa. Leia darth kamino gonk obi-wan jinn skywalker.

 


$("#btnGet").click(function ()
{
    $("#demo1").html($("#source").text());

});

$("#btnSet").click(function ()
{
    $("#demo1").text("Hello World");
});