From 9ced54a995912d496234c5091503b1e578d892f0 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Sun, 26 Jan 2014 16:23:14 -0500 Subject: [PATCH] inner/outer height/width setters, closes gh-98 --- entries/innerWidth.xml | 63 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml index 0a438e80..50bc45e0 100644 --- a/entries/innerWidth.xml +++ b/entries/innerWidth.xml @@ -1,10 +1,12 @@ + + Get the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element. .innerWidth() 1.2.6 - Get the current computed width for the first element in the set of matched elements, including padding but not border. + Get the current computed inner width for the first element in the set of matched elements, including padding but not border.

This method returns the width of the element, including left and right padding, in pixels.

This method is not applicable to window and document objects; for these, use .width() instead.

@@ -35,3 +37,62 @@ $( "p:last" ).text( "innerWidth:" + p.innerWidth() );
+ + + + 1.8.0 + + + + A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string). + + + + 1.8.0 + + A function returning the inner width (including padding but not border) to set. Receives the index position of the element in the set and the old inner width as arguments. Within the function, this refers to the current element in the set. + + +Set the CSS inner width of each element in the set of matched elements. + +

When calling .innerWidth("value"), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used for the width (such as 100px, 50%, or auto). Note that in modern browsers, the CSS width property does not include padding, border, or margin, unless the box-sizing CSS property is used.

+

If no explicit unit is specified (like "em" or "%") then "px" is assumed.

+
+ + Change the inner width of each div the first time it is clicked (and change its color). + + + + + + + + +
+
\ No newline at end of file