[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/jquery/ui/ -> effect-fade.js (source)

   1  /*!
   2   * jQuery UI Effects Fade 1.13.3
   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  
  10  //>>label: Fade Effect
  11  //>>group: Effects
  12  //>>description: Fades the element.
  13  //>>docs: https://api.jqueryui.com/fade-effect/
  14  //>>demos: https://jqueryui.com/effect/
  15  
  16  ( function( factory ) {
  17      "use strict";
  18  
  19      if ( typeof define === "function" && define.amd ) {
  20  
  21          // AMD. Register as an anonymous module.
  22          define( [
  23              "jquery",
  24              "../version",
  25              "../effect"
  26          ], factory );
  27      } else {
  28  
  29          // Browser globals
  30          factory( jQuery );
  31      }
  32  } )( function( $ ) {
  33  "use strict";
  34  
  35  return $.effects.define( "fade", "toggle", function( options, done ) {
  36      var show = options.mode === "show";
  37  
  38      $( this )
  39          .css( "opacity", show ? 0 : 1 )
  40          .animate( {
  41              opacity: show ? 1 : 0
  42          }, {
  43              queue: false,
  44              duration: options.duration,
  45              easing: options.easing,
  46              complete: done
  47          } );
  48  } );
  49  
  50  } );


Generated : Fri Nov 15 08:20:01 2024 Cross-referenced by PHPXref