Sha256: ae255a7e4b98a2dc679e6fcc78fbf8ecd976bcf60e088458da72cd882b4f527d

Contents?: true

Size: 1.19 KB

Versions: 8

Compression:

Stored size: 1.19 KB

Contents

/*
 * jQuery UI Effects Highlight @VERSION
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	jquery.effects.core.js
 */
(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' )
			};

		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();
				}
			});
	});
};

})(jQuery);

Version data entries

8 entries across 7 versions & 1 rubygems

Version Path
survivalkit-0.3.4 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.3.3 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.3.3 templates/drupal/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.3.2 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.3.1 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.3 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.2.1 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js
survivalkit-0.1 templates/project/sources/jquery-ui/ui/jquery.effects.highlight.js