Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (62 sloc) 1.784 kb
<?xml version="1.0"?>
<entry name="scale" type="effect">
<title>Scale Effect</title>
<desc>
Shrink or grow an element by a percentage factor.
</desc>
<arguments>
<argument name="direction" type="String" default='"both"'>
<desc>The direction of the effect. Possible values: <code>"both"</code>, <code>"vertical"</code> or <code>"horizontal"</code>.</desc>
</argument>
<argument name="origin" type="Array" default='[ "middle", "center" ]'>
<desc>The vanishing point.</desc>
</argument>
<argument name="percent" type="Number">
<desc>The percentage to scale to.</desc>
</argument>
<argument name="scale" type="String" default='"both"'>
<desc>Which areas of the element will be resized: <code>"both"</code>, <code>"box"</code>, <code>"content"</code>. Box resizes the border and padding of the element; content resizes any content inside of the element.</desc>
</argument>
</arguments>
<example>
<height>200</height>
<desc>Toggle a div using the scale effect.</desc>
<css><![CDATA[
#toggle {
width: 100px;
height: 100px;
background: #ccc;
}
]]></css>
<code><![CDATA[
$( document ).click(function() {
$( "#toggle" ).toggle( "scale" );
});
]]></code>
<html><![CDATA[
<p>Click anywhere to toggle the box.</p>
<div id="toggle"></div>
]]></html>
</example>
<example>
<height>200</height>
<desc>Toggle a div using the scale effect in just one direction.</desc>
<css><![CDATA[
#toggle {
width: 100px;
height: 100px;
background: #ccc;
}
]]></css>
<code><![CDATA[
$( document ).click(function() {
$( "#toggle" ).toggle({ effect: "scale", direction: "horizontal" });
});
]]></code>
<html><![CDATA[
<p>Click anywhere to toggle the box.</p>
<div id="toggle"></div>
]]></html>
</example>
<category slug="effects"/>
</entry>
Jump to Line
Something went wrong with that request. Please try again.