Alvin
Alvin

Reputation: 657

How to insert additional text using jquery or javascript

I want to know is it possible to insert additional text in HTML elements using jquery or javascript?

If there is already a text "Down" in paragraph elements, then I just want to append text "full", so that it would be "Down full". Is this possible? Which method should I use?

Upvotes: 0

Views: 1199

Answers (1)

Felix Kling
Felix Kling

Reputation: 817208

With jQuery, have a look at .append():

Insert content, specified by the parameter, to the end of each element in the set of matched elements.

E.g.:

$('p').append(' full');

Upvotes: 3

Related Questions