Click anywhere to resize.
$( document ).click(function() { $( "#toggle" ).effect( "size", { to: { width: 200, height: 60 } }, 1000 );}); (#)Api Size Effect
# jQuery UI API β Size Effect
## Category
(#)
## Usage
**Description:** Adjusts the size of an element to a specified width and height.
size
| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| to | Object | The height and width to adjust to. | |
| origin | Array | The vanishing point. | [ "top", "left" ] |
| scale | String | Which area of the element will be resized: "both", "box", "content". When set to "box", resizes the element's border and padding. When set to "content", resizes all content within the element. | "both" |
## Example
Use the Size Effect to adjust the size of an element.
Size Effect Demo #toggle { width: 100px; height: 100px; background: #ccc; }
YouTip