We can use the J.
Query after AND before methods to add content after or before an H criminal element.
In this example we have an image with two buttons below it.
If we click the insert before button we can see that the text is added before the image if we click
insert after the text is added after the image.
We'll take a look at our HMO page to see how this works
in our body tags.
We have two buttons each with a unique I.D. button one and button two.
We also have our image tag which contains the source of our image.
Now taking a look at our script we can see there's a click event attached and Button 1
when clicked.
We use the before method to attach some text before the image button to also has a click event when
clicked.
Text is attached after the image and that is how you apply the before and after methods.