jQuery HTMLLesson 15Free preview
jQuery Set
This lesson is part of jQuery · All levels
Summary
A set method group is used to change the content, value, or attribute of an element. By giving an argument to text(), html(), val(), or attr(), you convert the data into a new value. You can also combine multiple values at once into a paragraph.
Key points
- Providing an argument to text() replacing the entire content of the element text
- Html() with the argument adding a new markup to the element
- Val() fill the initial value of the form element
- Attr() with two arguments changing the attribute value
- Several elements can be changed at once in a single call.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.