lib-jquery-style-custom-development-bundle-ui-effects.shake.js / js
/* * jQuery UI Effects Shake 1.7.1 * * 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(.effects.shake = function(o) { return this.queue(function() { // Create element var el = this, props = ['position','top','left']; // Set options var mode = .effects.save(el, props); el.show(); // Save & Show }; animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance; animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2; animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2; // Animate el.animate(animation, speed, o.options.easing); for (var i = 1; i < times; i++) { // Shakes 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(){ // Last shake .effects.restore(el, props); }; })(jQuery);
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.