PageRenderTime 8ms CodeModel.GetById 5ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/Web/wp-includes/js/jquery/ui/jquery.effects.shake.min.js

https://bitbucket.org/jimjenkins5/blog
JavaScript | 5 lines | 1 code | 0 blank | 4 comment | 0 complexity | 0f7eda61dce38226f959fe4128118b94 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
1/*! jQuery UI - v1.8.20 - 2012-04-30
2* https://github.com/jquery/jquery-ui
3* Includes: jquery.effects.shake.js
4* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
5(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p<h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);