Javatpoint Logo

91-9990449935

 0120-4256464

Javatpoint Logo

jQuery outerWidth()

jQuery outerWidth() method is used to return the outer width of the first matched

element with padding and border.

The jQuery outerWidth () method works for both visible and hidden elements.

In the above image, you can see that jQuery outerWidth() method includes border and padding both.

Syntax:

Parameters of jQuery outerWidth() method

Parameter Description
includeMargin It is an optional parameter. It is a Boolean value which specifies whether to include the margin or not.
  • False:It is a default value. It specifies that not to include margin.
  • True:It specifies that include the margin.

Example of jQuery outerWidth() method

Let's take an example to demonstrate the effect of jQuery outerWidth() method.

Test it Now

jQuery outerWidth() example 2

Test it Now



Latest 4 Tutorials on JavaTpoint