mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
JQuery: Add support for outerWidth and outerHeight used as setters
As described in the following blog post, outerWidth and outerHeight can now be used to set the size of elements. http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/
This commit is contained in:
@@ -2178,6 +2178,8 @@ function test_outerHeight() {
|
||||
$("p:last").text(
|
||||
"outerHeight:" + p.outerHeight() +
|
||||
" , outerHeight( true ):" + p.outerHeight(true));
|
||||
|
||||
p.outerHeight(123);
|
||||
}
|
||||
|
||||
function test_outerWidth() {
|
||||
@@ -2185,6 +2187,8 @@ function test_outerWidth() {
|
||||
$("p:last").text(
|
||||
"outerWidth:" + p.outerWidth() +
|
||||
" , outerWidth( true ):" + p.outerWidth(true));
|
||||
|
||||
p.outerWidth(123);
|
||||
}
|
||||
|
||||
function test_scrollLeft() {
|
||||
|
||||
Vendored
+14
@@ -1447,6 +1447,13 @@ interface JQuery {
|
||||
*/
|
||||
outerHeight(includeMargin?: boolean): number;
|
||||
|
||||
/**
|
||||
* Sets the outer height on elements in the set of matched elements, including padding and border.
|
||||
*
|
||||
* @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
|
||||
*/
|
||||
outerHeight(height: number): JQuery;
|
||||
|
||||
/**
|
||||
* Get the current computed width for the first element in the set of matched elements, including padding and border.
|
||||
*
|
||||
@@ -1454,6 +1461,13 @@ interface JQuery {
|
||||
*/
|
||||
outerWidth(includeMargin?: boolean): number;
|
||||
|
||||
/**
|
||||
* Sets the outer width on elements in the set of matched elements, including padding and border.
|
||||
*
|
||||
* @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
|
||||
*/
|
||||
outerWidth(width: number): JQuery;
|
||||
|
||||
/**
|
||||
* Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user