Brak opisu

effect-puff.js 943B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!
  2. * jQuery UI Effects Puff 1.12.1
  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. if ( typeof define === "function" && define.amd ) {
  16. // AMD. Register as an anonymous module.
  17. define( [
  18. "jquery",
  19. "./effect",
  20. "./effect-scale"
  21. ], factory );
  22. } else {
  23. // Browser globals
  24. factory( jQuery );
  25. }
  26. }( function( $ ) {
  27. return $.effects.define( "puff", "hide", function( options, done ) {
  28. var newOptions = $.extend( true, {}, options, {
  29. fade: true,
  30. percent: parseInt( options.percent, 10 ) || 150
  31. } );
  32. $.effects.effect.scale.call( this, newOptions, done );
  33. } );
  34. } ) );