diff options
Diffstat (limited to 'ui/jquery.effects.shake.js')
-rw-r--r-- | ui/jquery.effects.shake.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js index 14c941809..011bd6b54 100644 --- a/ui/jquery.effects.shake.js +++ b/ui/jquery.effects.shake.js @@ -20,11 +20,11 @@ $.effects.shake = function(o) { var el = $(this), props = ['position','top','bottom','left','right']; // Set options - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var direction = o.options.direction || 'left'; // Default direction - var distance = o.options.distance || 20; // Default distance - var times = o.options.times || 3; // Default # of times - var speed = o.duration || o.options.duration || 140; // Default speed per shake + var mode = $.effects.setMode(el, o.mode || 'effect'); // Set Mode + var direction = o.direction || 'left'; // Default direction + var distance = o.distance || 20; // Default distance + var times = o.times || 3; // Default # of times + var speed = o.duration || o.duration || 140; // Default speed per shake // Adjust $.effects.save(el, props); el.show(); // Save & Show @@ -39,14 +39,14 @@ $.effects.shake = function(o) { animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2; // Animate - el.animate(animation, speed, o.options.easing); + el.animate(animation, speed, o.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.easing).animate(animation2, speed, o.easing); }; - el.animate(animation1, speed, o.options.easing). - animate(animation, speed / 2, o.options.easing, function(){ // Last shake + el.animate(animation1, speed, o.easing). + animate(animation, speed / 2, o.easing, function(){ // Last shake $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback + if(o.complete) o.complete.apply(this, arguments); // Callback }); el.queue('fx', function() { el.dequeue(); }); el.dequeue(); |