Sha256: 127b53e325a7c7306affc14e456f189557c8e821ba4f5212fe4e94b2612eecec

Contents?: true

Size: 1.34 KB

Versions: 31

Compression:

Stored size: 1.34 KB

Contents

/*!
 * jQuery UI Effects Pulsate 1.9.2
 * http://jqueryui.com
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/pulsate-effect/
 *
 * Depends:
 *	jquery.ui.effect.js
 */
(function( $, undefined ) {

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

})(jQuery);

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
RubyApp-0.7.16 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.15 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.14 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.13 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.12 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.11 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.10 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.9 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.5 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.4 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.3 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.2 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.1 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.7.0 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.71 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.70 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.69 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.68 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.67 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js
RubyApp-0.6.66 lib/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.effect-pulsate.js