CoreFiles by mySites.guru
effect-highlight.js60 lines, 1,243 bytes, from wordpress-7.0.zip
Raw History Compare with 6.9.12
md5
def0f7c16eff42733e3dc27d5b2b43e3
sha1
19b7c938b6a9927f499f71e0a4d1029e05f0f716
sha256
acca188c7c865755fb76ceb119e5f89be3a9e087efcb1696f25e4adfe5559f4b
/*!
 * jQuery UI Effects Highlight 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Highlight Effect
//>>group: Effects
//>>description: Highlights the background of an element in a defined color for a custom duration.
//>>docs: https://api.jqueryui.com/highlight-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "highlight", "show", function( options, done ) {
	var element = $( this ),
		animation = {
			backgroundColor: element.css( "backgroundColor" )
		};

	if ( options.mode === "hide" ) {
		animation.opacity = 0;
	}

	$.effects.saveStyle( element );

	element
		.css( {
			backgroundImage: "none",
			backgroundColor: options.color || "#ffff99"
		} )
		.animate( animation, {
			queue: false,
			duration: options.duration,
			easing: options.easing,
			complete: done
		} );
} );

} );

The same content is in 115 releases, WordPress 6.6-beta1 to 7.0.9. See them all, or every version of this file.