aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.shake.js
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-03-02 20:00:57 -0600
committergnarf <gnarf@gnarf.net>2011-03-02 20:00:57 -0600
commita370d1ffc8b0783a3a9ed1951e144902baddb264 (patch)
treeb974e1492c0e978663069b2b96e233dfbed66cc7 /ui/jquery.effects.shake.js
parent5fd1f17393d8467b3c873a379f4c55b9aa279ad1 (diff)
downloadjquery-ui-a370d1ffc8b0783a3a9ed1951e144902baddb264.tar.gz
jquery-ui-a370d1ffc8b0783a3a9ed1951e144902baddb264.zip
Just a quick touch to update to new internal effects object API
Diffstat (limited to 'ui/jquery.effects.shake.js')
-rw-r--r--ui/jquery.effects.shake.js20
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();