summaryrefslogtreecommitdiff
path: root/misc/ui/effects.shake.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-27 23:10:59 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-27 23:10:59 +0000
commit4ba822c158c54b87fe34f6b160c926e190d47573 (patch)
treee5bfecd9f752b80a2bf1d4b1c8eefa9b049de221 /misc/ui/effects.shake.js
parent1170f5650d75d94739eb90da0f1bd0a6e17e5631 (diff)
downloadbrdo-4ba822c158c54b87fe34f6b160c926e190d47573.tar.gz
brdo-4ba822c158c54b87fe34f6b160c926e190d47573.tar.bz2
#315035 by Damien Tournoud, Rob Loach, sun, mfer, et al: Adding jQuery UI 1.7.2 to core.
Diffstat (limited to 'misc/ui/effects.shake.js')
-rw-r--r--misc/ui/effects.shake.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/ui/effects.shake.js b/misc/ui/effects.shake.js
new file mode 100644
index 000000000..b852b4c4d
--- /dev/null
+++ b/misc/ui/effects.shake.js
@@ -0,0 +1,15 @@
+// $Id$
+
+/*
+ * jQuery UI Effects Shake 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery); \ No newline at end of file