Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Document that innerWidth/OuterWidth are now setters as well #98

Closed
mikesherov opened this Issue · 5 comments

8 participants

@mikesherov
Collaborator

usage:

innerWidth(number) will subtract the padding, in pixels from number, and set the css width of the element to the difference

outerWidth(number) will subtract the padding and border, in pixels from number, and set the css width of the element to the difference

outerWidth(number, true) will subtract the padding and border and margin, in pixels from number, and set the css width of the element to the difference

@pushplay pushplay referenced this issue from a commit in pushplay/DefinitelyTyped
@jameshfisher jameshfisher jQuery (inner|outer)(Width|Height) are setters as well as getters
This undocumented behavior is described in an open issue:

    jquery/api.jquery.com#98
86e45ee
@phanos

This one bit me today while I was searching for where a plug-in was setting inline styles, if it helps in updating the docs, it looks like the behavior change was between 1.7.2 and 1.8.0

@AurelioDeRosa
Collaborator

This update should be prioritized.

@dmethvin
Owner

@AurelioDeRosa A pull request would be a great motivator for this if it's something you'd like to see. Somehow this slipped through without a docs change. http://bugs.jquery.com/ticket/10877

@dmethvin dmethvin closed this in 0051b22
@scottgonzalez scottgonzalez reopened this
@tnoetzel

In case it's not clear, this also applies to innerHeight and outerHeight as well.

@arthurvr arthurvr closed this in 80d53f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.