aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.highlight.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-03-09 10:01:07 -0500
committerScott González <scott.gonzalez@gmail.com>2011-03-09 10:01:07 -0500
commit3875cf63e4bef49b0da888bc9c8e60b9512cbf60 (patch)
tree42387525b2207be91b9da7060d5d0de5c9b08f9e /ui/jquery.effects.highlight.js
parentfa7f5d2873b1fef978eab7d9f342c5afa77e061c (diff)
parent74cff5d57ae35ee05bff1138b1833e896997665d (diff)
downloadjquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.tar.gz
jquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.zip
Merge branch 'effects-api' of https://github.com/gnarf37/jquery-ui into gnarf37-effects-api
Diffstat (limited to 'ui/jquery.effects.highlight.js')
-rw-r--r--ui/jquery.effects.highlight.js27
1 files changed, 14 insertions, 13 deletions
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index 9a3edc5bc..b2ffb15e8 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -12,35 +12,36 @@
*/
(function( $, undefined ) {
-$.effects.highlight = function(o) {
- return this.queue(function() {
- var elem = $(this),
- props = ['backgroundImage', 'backgroundColor', 'opacity'],
- mode = $.effects.setMode(elem, o.options.mode || 'show'),
+$.effects.highlight = function( o ) {
+ return this.queue( function() {
+ var elem = $( this ),
+ props = [ 'backgroundImage', 'backgroundColor', 'opacity' ],
+ mode = $.effects.setMode( elem, o.mode || 'show' ),
animation = {
- backgroundColor: elem.css('backgroundColor')
+ backgroundColor: elem.css( 'backgroundColor' )
};
if (mode == 'hide') {
animation.opacity = 0;
}
- $.effects.save(elem, props);
+ $.effects.save( elem, props );
+
elem
.show()
.css({
backgroundImage: 'none',
- backgroundColor: o.options.color || '#ffff99'
+ backgroundColor: o.color || '#ffff99'
})
- .animate(animation, {
+ .animate( animation, {
queue: false,
duration: o.duration,
- easing: o.options.easing,
+ easing: o.easing,
complete: function() {
(mode == 'hide' && elem.hide());
- $.effects.restore(elem, props);
- (mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));
- (o.callback && o.callback.apply(this, arguments));
+ $.effects.restore( elem, props );
+ (mode == 'show' && !$.support.opacity && this.style.removeAttribute( 'filter' ));
+ jQuery.isFunction(o.complete) && o.complete.apply(this, arguments);
elem.dequeue();
}
});