You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
946 B

1 year ago
  1. /*!
  2. * jQuery UI Effects Fade 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: Fade Effect
  10. //>>group: Effects
  11. //>>description: Fades the element.
  12. //>>docs: http://api.jqueryui.com/fade-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. ], factory );
  22. } else {
  23. // Browser globals
  24. factory( jQuery );
  25. }
  26. } )( function( $ ) {
  27. "use strict";
  28. return $.effects.define( "fade", "toggle", function( options, done ) {
  29. var show = options.mode === "show";
  30. $( this )
  31. .css( "opacity", show ? 0 : 1 )
  32. .animate( {
  33. opacity: show ? 1 : 0
  34. }, {
  35. queue: false,
  36. duration: options.duration,
  37. easing: options.easing,
  38. complete: done
  39. } );
  40. } );
  41. } );