effect-puff.js 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*!
  2. * jQuery UI Effects Puff 1.13.2
  3. * http://jqueryui.com
  4. *
  5. * Copyright jQuery Foundation and other contributors
  6. * Released under the MIT license.
  7. * http://jquery.org/license
  8. */
  9. //>>label: Puff Effect
  10. //>>group: Effects
  11. //>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
  12. //>>docs: http://api.jqueryui.com/puff-effect/
  13. //>>demos: http://jqueryui.com/effect/
  14. ( function( factory ) {
  15. "use strict";
  16. if ( typeof define === "function" && define.amd ) {
  17. // AMD. Register as an anonymous module.
  18. define( [
  19. "jquery",
  20. "./effect",
  21. "./effect-scale"
  22. ], factory );
  23. } else {
  24. // Browser globals
  25. factory( jQuery );
  26. }
  27. } )( function( $ ) {
  28. "use strict";
  29. return $.effects.define( "puff", "hide", function( options, done ) {
  30. var newOptions = $.extend( true, {}, options, {
  31. fade: true,
  32. percent: parseInt( options.percent, 10 ) || 150
  33. } );
  34. $.effects.effect.scale.call( this, newOptions, done );
  35. } );
  36. } );