Sha256: 007c9bfd7288f2dd1e3f0d7522177dedbfb1b18ce0da7a2b83534e3037815ca0

Contents?: true

Size: 1.52 KB

Versions: 31

Compression:

Stored size: 1.52 KB

Contents

/* */ 
"format amd";
/*!
 * jQuery UI Effects Pulsate 1.11.4
 * http://jqueryui.com
 *
 * Copyright 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

31 entries across 31 versions & 1 rubygems

Version Path
sequenceserver-3.1.3 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-3.1.2 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-3.1.1 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-3.1.0 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-3.0.1 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-3.0 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.2.0 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.1.0 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc8 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc7 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc6 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc5 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc4 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc3 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc2 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.rc1 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.beta4 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.beta3 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js
sequenceserver-2.0.0.beta1 public/vendor/github/components/jqueryui@1.11.4/ui/effect-pulsate.js