Skip to content

Commit a6c23ca

Browse files
committed
Add shake-effect. Cleanup slide
1 parent 5663520 commit a6c23ca

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

entries/shake-effect.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0"?>
2+
<?xml-stylesheet type="text/xsl" href="../entries2html.xsl" ?>
3+
<entry name="shake" namespace="effect" type="effect">
4+
<desc>Shakes the element multiple times, vertically or horizontally.</desc>
5+
<options>
6+
<option name="direction" type="String" default="both">
7+
<desc>The direction of the effect. Can be "left", "right", "up", "down".</desc>
8+
</option>
9+
<option name="distance" type="Number" default="20">
10+
<desc>Distance to shake.</desc>
11+
</option>
12+
<option name="times" type="Number" default="3">
13+
<desc>Times to shake.</desc>
14+
</option>
15+
<option name="duration" type="Number" default="400">
16+
<desc>The number of ms the animation will run for</desc>
17+
</option>
18+
<option name="easing" type="String" default="swing">
19+
<desc>The easing function to use</desc>
20+
</option>
21+
<option name="complete" type="function">
22+
<desc>A callback function, executed when the effect completes</desc>
23+
</option>
24+
</options>
25+
<example>
26+
<desc>Shakes 3 times when clicking on the element.</desc>
27+
<code><![CDATA[
28+
$("div").click(function () {
29+
$(this).effect("shake", { times:3 }, 300);
30+
});
31+
]]></code>
32+
<html><![CDATA[
33+
<div></div>
34+
]]></html>
35+
</example>
36+
<category slug="effects"/>
37+
</entry>

entries/slide-effect.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</option>
2424
</options>
2525
<example>
26-
<desc>Puff the element away.</desc>
26+
<desc>Hides the element by sliding it down.</desc>
2727
<code><![CDATA[
2828
$("div").click(function () {
2929
$(this).hide("slide", { direction: "down" }, 1000);

0 commit comments

Comments
 (0)