jQuery HTMLLesson 16Free preview
jQuery Add
This lesson is part of jQuery · All levels
Summary
The Add method is used to insert new content into or around an existing element. append() and prepend() add content inside, while after() and before() place it outside the element. Content can be text, HTML elements, or other jQuery objects of choice.
Key points
- Append() add content at the end of the element
- Prepend() add content at the beginning of the element
- After() and before() insert outside the selected element
- The content you're inserting can be text, HTML, or jQuery objects.
- One call can put in many pieces at once.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.