The G query append method can be used to append data to the end of a specified each email element.
In this example we have a paragraph with some text in addition to an ordered list if we click the append
text button we can see that some additional text gets appended to the paragraph when we could append
list item a new list item is added to the end of the list.
We'll take a look at the HMO now to see how this works.
First in our body tags we can see we have our paragraph and the ordered list element.
We also have two buttons each with a unique I.D. button one and button two next in our script.
We have a click event attached to button 1
when the event is triggered.
The words more text are appended to any text contained within paragraph tags.
The second click event is for button to this event appends a list item named new sport to the ordered
list
you will notice that the text and list item are added at the end of the existing text
so we can see that any new list items are added at the end.
And any text is also added at the end of the existing text
we can change append to creep and
and this will add the new items before the existing text.
So I'll just save the file and refresh the browser.
You can see that the new items are now adding before the existing text.