Total width of element (including padding and border) in jQuery

来源:互联网 发布:php错误日志在哪 编辑:程序博客网 时间:2024/06/05 08:39

http://stackoverflow.com/questions/349705/total-width-of-element-including-padding-and-border-in-jquery

The original answer was written prior to jQuery 1.3, and the functions that existed at the time where not adequate by themselves to calculate the whole width.

Now, as J-P correctly states, jQuery has the functions outerWidth and outerHeight which include the border and padding by default, and also the margin if the first argument of the function is true


0 0
原创粉丝点击