Skip to content

Effects: Mark transfer-effect deprecated, document .transfer() #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion entries/transfer-effect.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<entry name="transfer" type="effect">
<entry name="transfer" type="effect" deprecated="1.12">
<title>Transfer Effect</title>
<desc>Transfers the outline of an element to another element</desc>
<longdesc>
<p>Very useful when trying to visualize interaction between two elements.</p>
<p>The transfer element itself has the class <code>ui-effects-transfer</code>, and needs to be styled by you, for example by adding a background or border.</p>
<p class="warning">This effect is deprecated, replaced by the <a href="/transfer/">.transfer()</a> method.</p>
</longdesc>
<arguments>
<argument name="className" type="String">
Expand Down
65 changes: 65 additions & 0 deletions entries/transfer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<entry name="transfer" type="method" return="jQuery">
<title>.transfer()</title>
<desc>Transfers the outline of an element to another element</desc>
<longdesc>
<p>Very useful when trying to visualize interaction between two elements.</p>
<p>The transfer element itself has the class <code>ui-effects-transfer</code>, and needs to be styled by you, for example by adding a background or border.</p>
</longdesc>
<signature>
<argument name="options" type="Object">
<property name="to" type="Selector">
<desc>The target of the transfer effect.</desc>
</property>
<property name="className" type="String" default="null">
<desc>A class to add to the transfer element, in addition to <code>ui-effects-transfer</code>.</desc>
</property>
<property name="duration" default="400">
<desc>A string or number determining how long the animation will run. The strings <code>"fast"</code> and <code>"slow"</code> can be supplied to indicate durations of 200 and 600 milliseconds, respectively. The number type indicates the duration in milliseconds.</desc>
<type name="Number"/>
<type name="String"/>
</property>
<property name="easing" type="String" default="swing">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<desc>A string indicating which <a href="/easings/">easing</a> function to use for the transition.</desc>
</property>
</argument>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<example>
<height>150</height>
<desc>Clicking on the green element transfers to the other.</desc>
<css><![CDATA[
.green {
width: 100px;
height: 80px;
background: green;
border: 1px solid black;
}
.red {
margin-top: 10px;
width: 50px;
height: 30px;
background: red;
border: 1px solid black;
}
.ui-effects-transfer {
border: 1px dotted black;
}
]]></css>
<code><![CDATA[
$( "div" ).click(function() {
var i = 1 - $( "div" ).index( this );
$( this ).transfer( {
to: $( "div" ).eq( i ),
duration: 1000
} );
});
]]></code>
<html><![CDATA[
<div class="green"></div>
<div class="red"></div>
]]></html>
</example>
<category slug="effects"/>
<category slug="effects-core"/>
</entry>