Added in .height(fn) and .width(fn) support. Fixes #5915.
This commit is contained in:
parent
781fe8b80d
commit
4f9aa62a85
2 changed files with 63 additions and 22 deletions
|
@ -23,6 +23,13 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
|
|||
if ( !elem ) {
|
||||
return size == null ? null : this;
|
||||
}
|
||||
|
||||
if ( jQuery.isFunction( size ) ) {
|
||||
return this.each(function( i ) {
|
||||
var self = jQuery( this );
|
||||
self[ type ]( size.call( this, i, self[ type ]() ) );
|
||||
});
|
||||
}
|
||||
|
||||
return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
|
||||
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue