Skip to content

Commit 4cd3452

Browse files
committedDec 16, 2015
Added performance warning to show and hide
Fixes gh-816 Closes gh-852
1 parent db305e6 commit 4cd3452

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎entries/hide.xml

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ $( ".target" ).hide();
3737
<p>Note that <code>.hide()</code> is fired immediately and will override the animation queue if no duration or a duration of 0 is specified.</p>
3838
<p>As of jQuery <strong>1.4.3</strong>, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called <code>swing</code>, and one that progresses at a constant pace, called <code>linear</code>. More easing functions are available with the use of plug-ins, most notably the <a href="http://jqueryui.com">jQuery UI suite</a>.</p>
3939
<p>If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but <code>this</code> is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.</p>
40+
<div class="warning">
41+
<p><strong>Note:</strong> This method may cause performance issues, especially when used on many elements. If you're encountering such issues, use performance testing tools to determine whether this method is causing them. Moreover, this method can cause problems with responsive layouts if the display value differs at different viewport sizes.</p>
42+
</div>
4043
<p>We can animate any element, such as a simple image:</p>
4144
<pre><code>
4245
&lt;div id="clickme"&gt;

‎entries/show.xml

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ $( ".target" ).show();
4040
<p>Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings <code>'fast'</code> and <code>'slow'</code> can be supplied to indicate durations of <code>200</code> and <code>600</code> milliseconds, respectively.</p>
4141
<p>As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called <code>swing</code>, and one that progresses at a constant pace, called <code>linear</code>. More easing functions are available with the use of plug-ins, most notably the <a href="http://jqueryui.com">jQuery UI suite</a>.</p>
4242
<p>If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but <code>this</code> is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.</p>
43+
<div class="warning">
44+
<p><strong>Note:</strong> This method may cause performance issues, especially when used on many elements. If you're encountering such issues, use performance testing tools to determine whether this method is causing them. Moreover, this method can cause problems with responsive layouts if the display value differs at different viewport sizes.</p>
45+
</div>
4346
<p>We can animate any element, such as a simple image:</p>
4447
<pre><code>
4548
&lt;div id="clickme"&gt;

0 commit comments

Comments
 (0)