.text()
The .text() method adds text to an HTML element.
These six jQuery methods let you control more aspects of HTML elements:
- .hide() hides the selected HTML element
- .show() displays an element
- .toggle() alternates hiding and showing an element
- .addClass() adds a CSS class to an element
- .removeClass() removes a class from an element
- .toggleClass() alternates adding and removing a class from an element
Event
hover(), click(), dblclick(), keypress()
DOM Traversal
.next()
The .next() method gets the next sibling of the selected element.
.prev()
The .prev() method gets the previous sibling of the selected element.
.children()
The .children() method gets the children of the selected element.
If provided a selector, the .children() method can get a specific child.