Sha256: d0a01b900a93e9e1fd3259eb7847fbd10bacbee91f8db24083344e64bb16c69d

Contents?: true

Size: 1.52 KB

Versions: 53

Compression:

Stored size: 1.52 KB

Contents

/*!
 * jQuery UI Effects Pulsate 1.11.0
 * http://jqueryui.com
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/pulsate-effect/
 */
(function( factory ) {
	if ( typeof define === "function" && define.amd ) {

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

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

return $.effects.effect.pulsate = function( o, done ) {
	var elem = $( this ),
		mode = $.effects.setMode( elem, o.mode || "show" ),
		show = mode === "show",
		hide = mode === "hide",
		showhide = ( show || mode === "hide" ),

		// showing or hiding leaves of the "last" animation
		anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
		duration = o.duration / anims,
		animateTo = 0,
		queue = elem.queue(),
		queuelen = queue.length,
		i;

	if ( show || !elem.is(":visible")) {
		elem.css( "opacity", 0 ).show();
		animateTo = 1;
	}

	// anims - 1 opacity "toggles"
	for ( i = 1; i < anims; i++ ) {
		elem.animate({
			opacity: animateTo
		}, duration, o.easing );
		animateTo = 1 - animateTo;
	}

	elem.animate({
		opacity: animateTo
	}, duration, o.easing);

	elem.queue(function() {
		if ( hide ) {
			elem.hide();
		}
		done();
	});

	// We just queued up "anims" animations, we need to put them next in the queue
	if ( queuelen > 1 ) {
		queue.splice.apply( queue,
			[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
	}
	elem.dequeue();
};

}));

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
wrgem-0.0.55 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.52 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.51 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.50 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.49 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.48 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.47 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.46 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.45 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.44 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.43 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.42 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.41 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.40 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.39 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.38 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.37 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js
wrgem-0.0.35 lib/generators/wrstart/template/vendor/assets/components/jqueryui/ui/effect-pulsate.js