effect-puff.js 995 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*!
  2. * jQuery UI Effects Puff 1.14.1
  3. * https://jqueryui.com
  4. *
  5. * Copyright OpenJS Foundation and other contributors
  6. * Released under the MIT license.
  7. * https://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: https://api.jqueryui.com/puff-effect/
  13. //>>demos: https://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. "../version",
  21. "../effect",
  22. "./effect-scale"
  23. ], factory );
  24. } else {
  25. // Browser globals
  26. factory( jQuery );
  27. }
  28. } )( function( $ ) {
  29. "use strict";
  30. return $.effects.define( "puff", "hide", function( options, done ) {
  31. var newOptions = $.extend( true, {}, options, {
  32. fade: true,
  33. percent: parseInt( options.percent, 10 ) || 150
  34. } );
  35. $.effects.effect.scale.call( this, newOptions, done );
  36. } );
  37. } );