[Jifty-commit] r5302 - in jifty/trunk: share/web/static/js
Jifty commits
jifty-commit at lists.jifty.org
Thu Apr 10 20:16:49 EDT 2008
Author: sartak
Date: Thu Apr 10 20:16:48 2008
New Revision: 5302
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/static/js/jifty_interface.js
Log:
r53870 at onn: sartak | 2008-04-10 20:16:38 -0400
Add a shake effect: jQuery(e).shake()
Modified: jifty/trunk/share/web/static/js/jifty_interface.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty_interface.js (original)
+++ jifty/trunk/share/web/static/js/jifty_interface.js Thu Apr 10 20:16:48 2008
@@ -58,3 +58,18 @@
);
}
};
+
+jQuery.fn.shake = function() {
+ this.each(function(init) {
+ var e = jQuery(this);
+ e.css('position', 'relative');
+ for (var i = 1; i < 5; i++) {
+ e.animate({ left: -20/i }, 50)
+ .animate({ left: 0 }, 50)
+ .animate({ left: 20/i }, 50)
+ .animate({ left: 0 }, 50);
+ }
+ });
+ return this;
+};
+
More information about the Jifty-commit
mailing list