Methods

The methods listed in the following table are commonly used for DOM manipulation.

HTML Example

We will use the following HTML for the examples listed below.

Examples

Click the image button to try the various CSS related methods below. For detailed information about each method, you may want to visit jQuery.com.

.addClass()

.css()

.hasClass()

.height(), or .height(value)

.innerHeight()

.innerWidth()

.offset()

.outerHeight()

.outerWidth()

.position()

.removeClass()

.toggleClass()

.width() or width(value)