The example in this article describes the usage of outerWidth() method in jQuery. Share it with everyone for your reference. The specific analysis is as follows:
This method gets the outer width of the first matching element.
By default the outer height is the sum of width, padding and border.
If the parameter is set to true, the outer margin size will also be included in the outer width.
This method works for both visible and hidden elements.
Can be combined with outerHeight() method to learn.
Grammar structure:
实例代码:
点击按钮可以显示div的元素外部宽度。
希望本文所述对大家的jQuery程序设计有所帮助。
本文转自:蚂蚁部落http://www.softwhy.com/