Skip to content

Commit 86c6965

Browse files
scottgonzalezjzaefferer
authored andcommitted
jQuery.effects.createPlaceholder: Initial docs
Ref gh-242 Ref gh-288
1 parent d723519 commit 86c6965

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<entries>
3+
<entry type="method" name="jQuery.effects.createPlaceholder" return="jQuery" added="1.12">
4+
<title>jQuery.effects.createPlaceholder()</title>
5+
<signature>
6+
<argument name="element" type="jQuery">
7+
<desc>The element to create a placeholder for.</desc>
8+
</argument>
9+
</signature>
10+
<desc>Creates a placeholder to support <code>clip</code> animations without disrupting the layout.</desc>
11+
<longdesc>
12+
<p>Many effects require animating the <code>clip</code> CSS property. In order to apply clipping, the element must be absolutely positioned. As a result, if an animation that utilizes clipping is applied to an element with static or relative positioning, the layout of the page will be affected when the animated element is removed from the flow. To compensate for this, a placeholder element with the same size and position can be inserted into the document.</p>
13+
<p><code>jQuery.effects.createPlaceholder()</code> will create a placeholder with the same display, position, dimensions, and margins as the original element. The placeholder is inserted into the DOM as the next sibling of the original element. When the animation is complete, <a href="/jQuery.effects.removePlaceholder/"><code>jQuery.effects.removePlaceholder()</code></a> should be used to remove the inserted element.</p>
14+
<div class="note">If the original element is already absolutely positioned, no placeholder will be generated since the page layout isn't affected. As a result, the return value will be <code>undefined</code>.</div>
15+
</longdesc>
16+
<category slug="effects-core"/>
17+
<category slug="effects"/>
18+
</entry>
19+
</entries>

0 commit comments

Comments
 (0)