jQuery Tutorial

jQuery width() Method With Syntax and Example

Understanding width method in jQuery

The width() method determines or returns the width of the elements that have been selected.

This method returns the width of the FIRST matched element when used to replace width. This method sets the width of ALL matched elements when used to set the width.

Padding, border, or margin is not included.

width method in jQuery

Syntax of width method in jQuery


Example of jQuery width method

Return the width of a

Did you find this article helpful?