aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.highlight.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-07-25 11:53:14 -0400
committerScott González <scott.gonzalez@gmail.com>2011-07-25 11:53:14 -0400
commit19a9de7e668cdb3b76c3b733d0147f1853cb38a5 (patch)
treea259b421dd77cbec27e55db9b4d1104bf5214a2a /ui/jquery.effects.highlight.js
parentdaadc343be2f139e82719e2e5ff466aa19ec166f (diff)
parent51ee3be39829e339c8e4bccb532347944e600ca5 (diff)
downloadjquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.tar.gz
jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.zip
Merge branch 'master' into core-1.6.1
Conflicts: demos/menubar/default.html tests/unit/autocomplete/autocomplete.html tests/visual/effects/effects.all.html ui/jquery.ui.menu.js ui/jquery.ui.popup.js
Diffstat (limited to 'ui/jquery.effects.highlight.js')
-rw-r--r--ui/jquery.effects.highlight.js60
1 files changed, 29 insertions, 31 deletions
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index cd4f0705a..edde845a3 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -12,40 +12,38 @@
*/
(function( $, undefined ) {
-$.effects.effect.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' )
- };
+$.effects.effect.highlight = function( o, done ) {
+ var elem = $( this ),
+ props = [ "backgroundImage", "backgroundColor", "opacity" ],
+ mode = $.effects.setMode( elem, o.mode || "show" ),
+ animation = {
+ backgroundColor: elem.css( "backgroundColor" )
+ };
- if (mode == 'hide') {
- animation.opacity = 0;
- }
+ if (mode === "hide") {
+ animation.opacity = 0;
+ }
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: 'none',
- backgroundColor: o.color || '#ffff99'
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- (mode == 'hide' && elem.hide());
- $.effects.restore( elem, props );
- (mode == 'show' && !$.support.opacity && this.style.removeAttribute( 'filter' ));
- jQuery.isFunction(o.complete) && o.complete.apply(this, arguments);
- elem.dequeue();
+ $.effects.save( elem, props );
+
+ elem
+ .show()
+ .css({
+ backgroundImage: "none",
+ backgroundColor: o.color || "#ffff99"
+ })
+ .animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( mode === "hide" ) {
+ elem.hide();
}
- });
- });
+ $.effects.restore( elem, props );
+ done();
+ }
+ });
};
})(jQuery);