source: trunk/template-common/lib/ui/minified/effects.shake.min.js @ 4918

Last change on this file since 4918 was 4918, checked in by nikrou, 14 years ago

Feature 1442 : update jquery

  • update jquery to 1.4.1
  • update jquery ui to 1.7.2
  • Property svn:eol-style set to LF
File size: 1.1 KB
Line 
1(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"left";var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var animation={},animation1={},animation2={};animation[ref]=(motion=="pos"?"-=":"+=")+distance;animation1[ref]=(motion=="pos"?"+=":"-=")+distance*2;animation2[ref]=(motion=="pos"?"-=":"+=")+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing)}el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}});el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery);
Note: See TracBrowser for help on using the repository browser.